Git in easy steps – branch

This is the third part in a series

Git in easy steps – the basic

Git in easy steps – amend and stash

Git in easy steps – branch

Then what is a branch in Git, actually? A branch in Git is simply pointer to the hash of a commit (which will be the HEAD commit of that branch), and a name of your branch, of course. That means creating a branch in Git is extremely cheap and is almost instantous.

Now if you look back at the branch tree in Git Extensions, you will see a linear tree. (It’s not something you usually see in your working environment, but we’re new anyway.). You can see that the name of the branches and the commit message are in bold.

For the commit, it means the commit is the HEAD commit of a active branch. A commit will always point to it parent (or its parents, in case of a merge). When you know the HEAD commit, you can know how does your branch look like, down to the initial commit (which has no parent).

Continue reading Git in easy steps – branch

Git in easy steps – amend and stash

This is the second part in a series

Git in easy steps – the basic

Git in easy steps – amend and stash

Git in easy steps – branch

Fixing your commit:

Sometimes, you make a mistake committing something. A file can be missing, or the indentation is not perfect, or you had a typo in your commit message. If you are using some other source control softwares such as Team Foundation Server you’re done with that. The only option you have is to check in another change set to fix your previous one (in case you have a typo in your commit message, be done with that). Git is so much more powerful in terms it allows you to rewrite history.

To fix a commit, make a change, then commit as usual, but this time, Select the “Amend commit” checkbox:

Always think twice before doing this
Always think twice before doing this

Continue reading Git in easy steps – amend and stash

Git in easy steps – the basics

This is the first part in a series

Git in easy steps – the basic

Git in easy steps – amend and stash

Git in easy steps – branch

Why Git Extensions.

The war of version control systems was over. Git has won. And that is not an over-statement. CSV, SVN, TFS were the past. Mercurial was close, but GitHub put the end of it. The popular of open source platform makes Git an unambiguous choice for almost every developer in the field . Even BitBucket, the service which once known for Mercurial, supports Git for now. If you start a new project today, Git should be your first and foremost option – well, unless your boss says otherwise.

But the end of a war does not mean everything else is settled. The war of Git clients continues. How many Git clients do we have? I lost count, but at least: Git bash (with comes as the default), TortoiseGit, SourceTree, and of course, Git Extensions. It reminds me a lot of the JavaScript frameworks’ war recently: “There are too many frameworks out there, let’s create a new one to rule them all”. Of course, Git clients’ war is in much smaller scale (You won’t see new Git clients every week), but that does not make it less intense. Git clients are used in a daily basis, and it really affects your productivity, and in some way, your moral as well.

Continue reading Git in easy steps – the basics

What does it take to be a developer?

No I’m not talking about becoming a “developer” like Bill Gates, or Mark Zuckerberg, or even someone less “famous” like Linus Torvald or Anders Hejlsberg. Man, I’d give up many things to become one of those. To become such successful developers, you must be extremely talented, extremely determined, and of course, a sizable amount of luck. I’m talking about an average human being, trying to become a person who can enjoy his work (and hopefully, provide his family with that work). 

Somebody might think, it’s easy to be a developer today. Most problems can be found on the internet – by searching Google, or asking questions on sites such as StackOverflow. Some might even jokingly define “programming = copy and paste answer from StackOverflow”, but we all know that, it takes more than that.

I’ve been trying to answer that question. I’m not a great developer by any mean. A decent, at most (My boss has been saying that I’m doing a very good job, I truly hope he’s not just being nice). It’s been 14 years since I get into programming, 10 years since I made the final decision to be a programmer, when I chose the faculty at my university  and 6 years since I began my professional career as a developer. It’s been all natural to me – what does it take to be a decent developer?

Continue reading What does it take to be a developer?

Don’t be that developer

It’s never been easier to be a developer. With the availability of Internet these days, for almost anywhere, anytime, it’s just few clicks away to find the answer of your question. With proper keywords, especially when you have an error message, Google can lead you to the answer within a fraction of second – mostly StackOverflow, or some other websites/blogs that the people have already answered it.

If you want a more specific question where you can’t find an answer to, you can simply ask. It’s free. The days of Expert-sexchange are long gone. People around the world are willing to help you, without knowing who you are – they jump into your question, read it, guess it, understand it, ask something to clarify, think about a solution, possibly try it, post it to you.

They spend time, their precious time, to make your life, just a little easier.

And they don’t charge you a penny. Perhaps they like solving problem. Perhaps they like helping people. Perhaps they like the reputation count in SO. But in the end of the day, you don’t have to spend a bunch of money a professional consultant would cost you.

Continue reading Don’t be that developer

Joel test scores are (somewhat) outdated – you should ask something else

Joel test scores are widely accepted as the “12 golden checks” for interviewee to ask interviewer during an interview. They were originated by Joel Spolsky – and his blog was famous among developers, they were quite well-known – and have been popularized even more with StackOverflow (where Joel Spolsky is one of the founders). StackOverflow Jobs even have a check list for recruiters when they post their job vacancies. Here’s the list:

  • Do you use source control?
  • Can you make a build in one step?
  • Do you make daily builds?
  • Do you have a bug database?
  • Do you fix bugs before writing new code?
  • Do you have an up-to-date schedule?
  • Do you have a spec?
  • Do programmers have quiet working conditions?
  • Do you use the best tools money can buy?
  • Do you have testers?
  • Do new candidates write code during their interview?
  • Do you do hallway usability testing?

The list served its purposes for a long time – and I can say it, to a point – contributed to software industry. When developers are aware of such things, companies need to adapt to attract talents – resulting in better work environments and processes (again, there are companies which do that well before the list, and there are companies do not care about it at all).

Continue reading Joel test scores are (somewhat) outdated – you should ask something else

It’s Microsoft, after all

The news that will interest most of .NET developers today, is Microsoft decided to sack project.json and come back to MSBuild.

We feel lucky because we held off the transition to ASP.NET Core, but the other teams in my company might not be as happy. They will have to move back – and that means there will be a delay in developing new features. (Yes, we invest in a pre-release framework, because that’s what you need to do to stay ahead of your competitors)

You might say you saw it coming.

It’s not the first time Microsoft creates something cool, lets some of us fall in love with it (or even have our lives depends on it), the eventually kills it off.

Remember Silverlight?

Or XNA?

Or Windows Workflow Foundation 3.5? Technically there was WF 4.0, but the API:s were entirely changed, to the point that we can consider Microsoft killed WF and created something else with the same name.

Sadly enough, this is not uncommon in the software industry – especially in a big company like Microsoft. Microsoft has many divisions, each division has many teams and those teams, unfortunately, *compete* with each other, sometimes. Sometimes they win. Sometimes they lose the battle and their product is killed in a favor of other product from other team. It’s not something super secret about Microsoft – in fact – it’s quite well known.

It’s bad habit, without a doubt. You invest your time into learning it. Your company invests their money into using it. And then you have to start all over, again. You can still keep using the technology, it will not just die, but the does mean you put yourselves in the risk of lagging behind and security threats.

This time, it’s slightly better because the ASP.NET Core, technically, has not been released yet. It’s still bad because Microsoft should have made the decision before the Release Candidate, but I feel lucky. What if Microsoft makes it to ASP.NET Core 1.0, and we use it, then they kills it off in 2.0? What if we invest hundreds of development hours into it and then spend another hundreds of hours reverting back?

For me, personally:

It’s good thing this time we don’t have to learn a new thing. It’s bad thing this time we don’t have a new thing to learn.

 

 

Never send me my password

I’m not a security expert myself, not even close, but for more than once, I’ve been greatly concerned about the risks for having accounts in several websites. I wonder myself why did the developers there go with the decisions that bad.

It’s already bad enough to use HTTP on your register/login page . It’s even worse when you send me my password in plain text. Either the one I chose or the one you randomly generated for me.

Oh please, I know what my password is
Oh please, I know what my password is

And this has happened more than once. Each time, it raises my eyebrows higher and higher. I don’t want to rant here – but it takes great deal of ignorance or laziness, or both, do do such as bad practice about securities.
Continue reading Never send me my password

Git: In easy steps – Another book project

Git: In easy steps cover
Git: In easy steps cover

Well, I might start a living based on writing. If my books sell good enough. Yes, it’ll be available on Leanpub and you can register now to get a notification: https://leanpub.com/gitineasysteps.

In this Easter I decided to start a new book project, based on what I’ve been doing daily: Git in easy steps.

Who is this book for?

This book explains Git concepts in a simple way, with examples in Git Extensions – the Git client to beat. It will walk through the flow and see what should we do, and why. Needless to say, it’s a beginner book. If you are already a Git expert, look else. (Of course you are still welcome to buy this book, well, you know, to complete your collection).

Continue reading Git: In easy steps – Another book project