You're viewing all posts tagged with linux

What does linux feel like?

From Big Think Interview With David Heinemeier Hansson:

I felt exactly the same way. I was absolutely not convinced that I was going to be a programmer when I was working with PHP and Java.

He’s talking about the experience of moving from Java to Ruby.

I can say the same thing about linux ^_^

There were times when I was doing work under windows where I just got burned a lot and I was feeling that maybe programming is not for me after all. I was using python, but it was still windows, and while the language itself was awesome, the windows environment sucked horribly.

More on “Linux is an IDE”

In a previous post, I was ranting about the windows-based development environment at my day job, and by the end I said “Linux is an IDE”.

I didn’t actually come up with that: I took it from a comment on stackoverflow by dsm, on an answer to the question of IDEs on Linux

There are things in VS that are not obviously present in vim or emacs or whatever, like renaming across the entire project. That’s true; but that’s not the important thing in an IDE. It’s not always possible to implement anyway; I’ve only seen it for Java and C#, it’s not practical to implement for C++ or python. C++ is too hard to parse, while python is dynamic and attributes can be added/modified at run time, so no static analysis tool can provide a solid renaming functionality.

And Linux does have VS-like IDEs: NetBeans, Eclipse, KDevelop and QtCreator. They have a whole bunch of features that should make VS users feel less intimidated.

But that’s not the point, really.

A few days back I built firefox from source on an ubuntu virtual machine to try and isolate a bug we were experiencing.

It was a simple, 3-step process:

1- install the build dependencies 2- download the source 3- build

On windows, Step #1 would probably take hours of googling. Step 2 and 3 won’t be that hard, because in step 1 you would’ve had to download a whole bunch of linux tools :)

On ubuntu, step 1 is simply apt-get build-deb firefox This command installs all the build dependencies for firefox.

Step 2 is a simple Mercurial command to clone the repository, and step 3 is just “make” basically.

I went to the extra trouble of installing a virtual machine and installing ubuntu on it, just so that I wouldn’t have to deal with step #1 on a windows machine, because I’ve been there before, and I know it sucks.

My point is, linux is full of tools with a lot of features that are specifically developed to make programmers’ life easier.

There is a steep learning curve, but once you get it, your productivity will jump 10 folds.

Think of developing on windows as trying to type up a big document without knowing your way around the keyboard: you look for 2 seconds before finding each button!

While developing on linux is like typing the same document when you can touch-type.

Yes, it takes time to learn to type without looking at the keyboard, but it makes your life ridiculously easier.

Again, I didn’t exactly come up with this metaphore myself: it’s from the “OMG why do these crazy people use vim” article, (under micsonception #3).

developing on windows vs developing on linux

Windows sucks! really, it sucks for development.

ok, let me rephrase that: windows sucks for serious development.

This comes down to the windows culture: programs are designed for humans who only use the application occasionally to get something done.

Consider this scenario: I have a large project, I recieve a bug report about a bug in a previous version of the project. The project is actually comprised of several sub-projects.

Here’s what I need to do before I even start examining the bug or doing anything:

  • Checkout the proper version of each sub-project from the repository
  • Build sub-projects in the correct order (of dependancy).

Now, in a linux environment, where I’m using git and automake, I would simply checkout the proper branch (for the version) and run make.

In the worst case scenario where there’s nothing linking the project at the make level, I will have a 6 line script that builds them in the correct order.

very simple command line setup.

Now, what if I’m on windows?

Well, chances are, windows users won’t be using git or make or anything “archaic” like that. They will have visual tools where each action takes about 10 clicks or so to complete.

So, what do we do?

Well, fire up the “visual” application that connects to the central repository and checkout the specific branch of each project one at a time, where the checkout process includes:

  • opening the project from a list of project
  • going through menus/submenues to select the proper branch for the version we need (might require looking up the dependency list in a separate document/application)
  • checking out that version (usually a single button, or a menu item)
  • wait for the progress bar to fill up

Repeat that process about 5 or 6 times (depending on how many sub-projects you have).

I kid you not, this is the actual process required with some certain “commercial” “enterprise-class” tools for “source configuration management” (I can’t spell out its name though).

Now, time to build:

After you’ve checked them all out, you have to open up your fancy IDE; usually that would be visual studio (fortunately, this one I can name).

Again, open up each project in the correct order and build it separately.

This is a really tedious process when you have to do it 3-5 times a day.

Compare this to: git checkout version_branch && make

I will admit, the windows process is easier for newbies, and is bareable if you only do it once a month or so. But for serious development, this process is just unacceptable.

Now, theoretically, you can automate this process in windows using some scripts; but here’s the catch: the tools are NOT designed for scripting; yes, most of them have some kind of a command line interface, but it’s not very well tailored towards time-saving scripting magic.

And, suppose you do manage to script that operation, what about all the other operations that you need to do for serious development? All the tool-chain in windows is centered around gui apps with lots of menus and buttons and forms that must be filled.

So, you can still script that, but, what’s the point? If you’re gonna go command-line, go command-line for real and start using linux.

That’s what I did, and that’s why I really switched to linux.

When I started developing a real project in windows, I was browsing for files in windows explorer!! oh the horror! After a while I got really tired, and started looking for alternatives. The best thing you can find on windows is xyplorer (it’s not free, but it’s the only good option I could find).

Little by little I kept ditching all the default windows tools and switching to better tools: console2 for a terminal (the one and only free terminal emulator on windows), winscp for ssh file upload (windows doesn’t even have an ssh tool, for God’s sake!!!), I started using git (msysgit) for source code management, and got used to typing ls at the command line :)

One might say: but Linux doesn’t have a decent IDE!!!

Well my friend, Linux is an IDE

Linux, (or rather, Unix, (which GNU/Linux happens to be a clone of)) is an integrated development environment.