WORKING WITH BITBUCKET

Bitbucket is a hosting site for the distributed version control systems (DVCS) Git and Mercurial more

Bitbucket offers two types of repositories.

  1. Public – available to all the users around the globe.
  2. Private – only invited users have access (read, write, admin

You must have at least read only access to work with bitbucket repository. There are several steps to follow when working with bitbucket in development process.

Downloading code from bitbucket for development

Before starting any changes, we need to have the source files. Bitbucket documentation suggests that you follow the steps given below.

  1. Create a Fork of the repository. (Forking a repository creates a new repository under your online bitbucket account. This new repository is a copy of the original repo and is called a fork.)ForkFork Repository
  2. Clone the forked repo from Bitbucket to your local system. On your local system execute the following command to clone the bitbucket repository.$ git clone https://username@bitbucket.org/user/repo-name.git
  3. There is a possibility that git gives you an error; (error: SSL certificate problem, verify that the CA cert is OK.)

    If this is the case, then you have three solutions to resolve this error.

    • Execute each git command with this format.

             $ env GIT_SSL_NO_VERIFY=true git clone ………

    • Execute the following command in your repository folder to temporarily disable SSL

             $ git config http.sslVerify false

    • Execute the following command to disable SSL on all local commands

                             $ git config –global http.sslVerify false

Uploading changes at bitbucket

After downloading the code, you can make any changes which you need to resolve the issues. And once you are finished with changes you can push your changes at bitbucket. The steps to push changes at bitbucket are given below.

  1. Start git bash and move in the local directory (using cd command) where your bitbucket repository is residing.
  2. Execute the following git commands.
    1. $ git add .
    2. $ git commit –m “your comments about this change”
    3. $ git push –u origin local-branch-name (to push one local branch at bitbucket) OR
    4. $ git push –u origin –all (to push all local branches at bitbucket)

Merging changes on bitbucket

Since you created a fork to work with, so after pushing changes at bitbucket you need to merge the changes with your original repository. Below are the steps to merge changes at bitbucket.

  1. Go to the fork repository.
  2. Click on Pull Request link.
    Merge
  3. It will display Create Pull Request page. Select source branch, destination branch and provide title and description of the Pull Request.
    Pull Request
  4. If there are any conflicts, the screen will also show the conflicts and the commands to resolve the conflicts. And Pull Request with conflict cannot be merged automatically.
  5. When you create a Pull Request, the administrator of original repository will see list of Pull Requests in his repository.
    Pull request repository
  6. The administrator can view details of any Pull Request by clicking on its title.
    Merge
  7. Administrator can Merge, Edit, Decline or Approve any Pull Request.
  8. After merge process, the changes of the source branch of Pull Request, will be available in the destination branch mentioned in the Pull Request.

Windows 8.1 Update and Metro Application Crashes

Windows 8.1 updates has pretty good features which attracts but it doesnt contain lot of feature as expected.

Windows 8.1 requires Video Graphic driver properly installed. If you install Windows 8.1 from ISO then it will install a seperate and fresh installation which will let you install all the softwares once again. Which is quite tiring. Also Windows 8.1 requires NS enabled from your bios settings. If you didnt install contact with your administrator or get a updated bios update from their manufacture website.

Remember this update is not that stable and has many issues which existed Metro applicaiton which crashes most of the time. If you are lucky you might get some application which will work fine with Windows 8.1.

It is more frustrating when Metro Skype application crashes. you might found some fixes from internet about graphic setting but this is not going to work at all.

Conclusion: Please don’t update Windows 8.1, Its not stable and surely will disappoint you.

Software architect Interview questions compilation

When it comes to a job interview, software
architects
must display the right mix of technical knowledge, project
management experience and effective communication skills. Because of this, the
conversations are generally divided into three parts: how the architect displays
knowledge and skills in a hypothetical situation, past projects and how he or she
communicates. Yet above all, software architects should be a good cultural fit who
can understand the specific needs of a business and work successfully with all
the people involved in software projects.

Eleven Interview Questions for Software ArchitectsThe following are commonly asked interview
questions:

Show me how you would go
about architecting this software solution.

Interviewers
will often give you a hypothetical software design solution to sketch out on a
white board, or simply explain. One such question asked by Vasanthan Dasan,
CTO and vice president of engineering for staffing firm the Armada Group, is: architect a software solution for a platform
as a service for the state of California’s vehicle registration records.

“The
candidate should explain not only the technology aspect of the problem – such
as the front and back end of the Web technology, tables, databases and the like
– but also reveal good communication skills,” says Dasan. “They
should explain how they gather and translate client and user requirements to a
team of software engineers that is developing the solution.”

Explain a project you worked
on previously.

This is the blanket interview question intended to gauge experience
and communication skills. You should explain in depth previous work including
the planning, problems, team building with engineers, time spent and obstacles
you faced.  A common follow up question: Did the project work the way you originally
designed or intended it too? Why?

Talk about one of your
successful projects and why it was successful.

This question is used to find out what you value in the software
development process and to help the interviewer see if you’ll fit the needs of
a particular organization.

What kind of atmosphere
do you like to work in?

This
is designed to ascertain whether you’re the right cultural match at a company
or project

“I
try to really have a genuine and sincere discussion about what they like and
don’t like,” says Matt Allison, It product manager for Kelly IT. Another question Allison likes
to ask: What do you think
the best way for software to be architected?

How would you define a
database table for information to be stored and why did you choose that
database?

Similar questions: What
database management systems have you worked with? Can you work with MySQL
and/or Oracle Database?

‘This gives me a good understanding of how this person thinks and
their familiarity with the latest technology,” explains Dasan.

How do you manage conflicts
in Web applications when different people are managing and working on data?

Similar question: How do you
help identify who is responsible for changes in a software project?

You’ll need to explain how you manage a team, including how the
team documents a project in order to avoid design conflicts. You should give
examples of how you’ve used effective communication for successful results in a
team environment.

“Just because somebody can architect software doesn’t make
them a successful software architect, which is why I ask project management
questions,” explains Kelly O’Connell, a branch manager for Robert Half
International.  

Which tools have you used
for testing code?

Similar question: Tell me something
you know about testing or QA?

You should know the difference between functional or exploratory
testing and explain how you’ve used it in the past. 

How do you find a middle
item in a linked list?

“I ask simple algorithm questions, since any programmer,
engineer or software architect should be comfortable talking about algorithms,”
says O’Connell.

Name the differences between
object-oriented design and component-based design>

This question is not only intended to test your knowledge, but also
to find out your design expertise.

Give an example of when
you were innovative with software architecture.

Similar
question: When did you think creatively
and create software that wasn’t seen before?

What do you think is the
best way for software to be architected?

Similar
questions: What methodologies have worked
with? Which do you prefer? Why?

– Chandler Harris

Found from:
http://news.dice.com/2011/01/07/eleven-interview-questions-for-software-architects/

Some good resources:
http://www.codeproject.com/Articles/28583/SOA-Interview-Questions-Part-1

https://sites.google.com/site/techinterviewfaqs/software-architect-questions
http://www.dotnetspark.com/kb/169-software-architecture-interview-questions.aspx
http://blogs.msdn.com/b/nickmalik/archive/2007/01/29/systems-architecture-interview-questions.aspx
http://softarchitect.wordpress.com/2010/07/23/software-architecture-interview-questions-for-windows-communication-foundation-wcf-architect/
http://blog.adnanmasood.com/2013/05/21/interview-questions-for-a-software-architect/
http://careers.simplicable.com/careers/new/101-enterprise-architecture-interview-questions
http://www.hanselman.com/blog/NewInterviewQuestionsForSeniorSoftwareEngineers.aspx
http://www.gobookee.org/software-architect-interview-questions/

Good thread from forum
http://www.coderanch.com/t/561744/Jobs/careers/top-interview-questions-asked-Architect

Assigning Session to nothing or Session.Abandon

I have seen so many developers once they wanted to destroy session, they used

Session(“A”) = Nothing

Its not a good practice to assign nothing object.

Correct:

 

Session.Abandon

 

The Session.Abandon method basically destroys a user session.

One thing I would add the current Session object will not delete untill the script on the current page have been processed completely.

Sorry for your inconvience, I have my official blog please visit for complete article:

http://blog.joggee.com/?p=143

 

 

 

 

 

TODO Comments

Please check the detail with my official blog

http://blog.joggee.com/?p=135

 

 

ResolveUrl Method

ASP.NET’s Control class which provide a wonderful method ResolveURL thats parse relative URL’s path and make it ready and fix URL into one that is readable and usable on the requesting client.
Using tilt sign ~ that makes control execute and search inside the application.
E.g.

wwwroot/images/joggee.jpg
reference path : “~/images/joggee.jpg”

 
Example:
 

 

<img alt=”” height=”7″ hspace=”6″ src=<%=ResolveURL(“~/images/index_40.jpg”) %> width=”4″ />

Rana

 

Exporting Data from MS SQL SERVER to MySQL

Readers, always ask me to write on CURSOR, with their customize problem, But I normally write which will help
every one. One of reader asked me long back about the cursor and exporting data from MS SQL Server to MySQL.I had the same scenario, I need to export data from MS SQL to MySQL, and I have to do it quickly.
I didnt find on internet a better solution because of the time constraint.
I have acheived my task by using CURSOR and generate customize queries, So I can execute them at MySQL database and populate required data.

My main focus is to share how to use cursor and also one of the way to export data from MS SQL Server to MySQL. 

You can customize and replace your queries with one written below.

Lets Start. 

–insert records in a temp table

Select
username
,
‘e50b13c57937586c4c6c6fa30f0bce24’ as ‘password’,
’33VPTHTe’ as ‘salt’,
‘dkRZvhwOMrXLwL8mSJA2PneuMkBCXD9aRLuWjgIF2grtYNW6bQ’ as ‘loginkey’,
user_email as ’email’,
‘1206339144’ as ‘regdate’,
‘1206423077’ as ‘lastvisit’,
‘0’ as ‘lastpost’,
snull(User_website,) as ‘website’,
isnull(user_icq,) as ‘icq’,
isnull(user_aim,) as ‘aim’,
isnull(user_yim,) as ‘yahoo’,
isnull(user_msnm,) as ‘msn’,
isnull(user_sig,) as ‘signature’,
isnull(user_allow_pm,‘0’) as ‘receivepms’,
isnull(user_notify_pm,‘0’) as ‘pmnotify’,
isnull(user_allowavatar,‘0’) as ‘showavatars’,
‘2’ as ‘usergroup’
into #temp
Fromphpbb_users
Where user_session_page<>0 

–Declaring variables to insert column values later
Declare @username varchar(1000)
Declare @password varchar(500)
Declare @salt varchar (250)
Declare @loginkey varchar(500)
Declare @email varchar(500)
Declare @regdate varchar(500)
Declare @lastvisit varchar(500)
Declare @lastpost varchar(500)
Declare @website varchar(500)
Declare @icq varchar(255)
Declare @aim varchar(255)
Declare @yahoo varchar(255)
Declare @msn varchar(255)
Declare @signature varchar(255)
Declare @receivepms varchar(255)
Declare @pmnotify varchar(255)
Declare @showavatars varchar(255)
Declare @usergroup varchar(10)

–declaration of the cursor
DECLARE @getBB CURSOR

–Initializing of cursor for particular query result.
SET @getBB = CURSOR FOR SELECT * FROM #TEMP

OPEN @getBB –opening a cursor
FETCH NEXT –Syntax of cursor to move next
FROM @getBB INTO — Inserting single row data as a column to variables

@username ,@password,@salt,@loginkey ,@email,@regdate,@lastvisit,@lastpost,
@website,@icq,@aim ,@yahoo,@msn,@signature,@receivepms,@pmnotify,@showavatars ,@usergroup

WHILE @@FETCH_STATUS = 0 — condition execute until record end

BEGIN 

— Here you can write your customize result or further execution.

Print ‘ INSERT INTO users(username, password, salt,loginkey,email, regdate, lastvisit,
lastpost, website, icq, aim, yahoo, msn, signature, receivepms,
pmnotify,showavatars,usergroup
)VALUES

(

”’

+ @username + ”’,”’+ @password + ”’,”’+ @salt + ”’,
”’
+ @loginkey + ”’,”’+ @email + ”’,”’+ @regdate + ”’,
”’
+ @lastvisit + ”’,’+ @lastpost + ‘,”’+ @website + ”’,
”’
+ @icq + ”’,”’+ @aim + ”’,”’+ @yahoo + ”’,”’+ @msn + ”’,
”’
+ @signature + ”’,”’+ @receivepms + ”’,”’+ @pmnotify + ”’,
”’
+ @showavatars +”’,”’ + @usergroup + ”’);’
 
FETCH NEXT — Moving next
FROM @getBB INTO — Insert next record to the variables.
@username ,@password,@salt,@loginkey,
@email,@regdate,@lastvisit,@lastpost,@website,@icq,
@aim ,@yahoo,@msn,@signature,@receivepms,@pmnotify,@showavatars ,@usergroup
ENDCLOSE @getBB — Closing variable
DEALLOCATE @getBB — removing from the memory
GO–droping table.

DROP TABLE #TEMP
—————————————————————————————–
Hope this will solve Export data from MS Sql Server to MySQL and also explain a cursor.

Rana

What’s the difference between a 301 Redirect and a 302 Redirect?

301 Redirect
Redirects to the site you specified in the Forward To field using a “301 Moved Permanently” HTTP response. The HTTP 301 response code tells user-agents (including search engines) that the location has permanently moved.

302 Redirect
Redirects to the site you specified in the Forward To field using a “302 Moved Temporarily” HTTP response. The HTTP 302 response code tells user-agents (including search engines) that the location has temporarily moved.

ASP.Net – Global.asax not firing

“I am experiencing problem with global.asax; events are not firing, I cant debug global.asax” One of my reader asked me.

Simple and reliable solution is.

Remove global.asax from your project and add again and leave in on the root of the project.

Since we are using ASP.Net 2.0 there is no Global.asax file in visual studio solution by default.

This will solve the problem, Global.asax

Rana