The Developer Day | Staying Curious

TAG | windows

Sep/09

7

Migrating Development from Windows to Linux

I’ve been using Windows as a development platform for more than three years now. Couldn’t say I find it always productive, but I also wouldn’t say that it is very troublesome.

I have been a Linux user for a few years quite a while ago. Tried debian, redhat, slackware and gentoo. Went through the pleasures of compiling kernels, trying to enable the right audio drivers, not being able to make my ATI video card work, experimenting with Wine, going through a guide to setup hibernation, trying to set the right opacity for my terminal screen. I would dare to say Linux systems were still in dark ages. It was challenging to get everything right and have all the shizzle that Windows users had by default. At some point I just couldn’t be bothered anymore and started using Windows again.. Next, Next, Finish.

And Windows is great. Up to a point. First you get all the default stuff taken care of like for example enabling a printer over network, plugging in a new USB device, setting up hardware drivers, sharing files. Setting up a development environment is as easy as downloading Xampp, an editor of your choice and you can start whipping some source code. And Cygwing helps a lot by delivering a lot of every day use tools to a Windows based platform.

Until you hit the rocks. For example a famous Xdebug PHP extension has problems working with Windows Vista and will often crash PHP processes. Extensions like ffmpeg-php are not maintained on Windows and are only available on Linux and it makes matters worse when you for some reason can’t do without them. Or for example good luck developing Drizzle on windows and building it using Cygwin, when some networking library just won’t compile. Suddenly you realize that your whole career is built on top of opensource tools which most of them were built and are maintained on Linux systems.

That is why I’ve decided to give Linux another go. I have selected Ubuntu Jaunty 9.04 to carry on my experiments. Here follows my list of pros and cons of using Ubuntu as a development platform.

I’ll start with cons:

  1. The latest version of PHP is 5.3.0. Ubuntu package management system offers 5.2.6. I found this a bit dissapointing. I really don’t want to be bothered to compile PHP or to search for 3rd party packages. I understand the philosophy behind this, but it still saddens me as a developer. Especially when PHP 5.3.0 builds are available on Windows as next, next, finish packages.
  2. Same goes for Eclipse IDE. Not only there were no packages for Eclipse 3.5 but I had to download Eclipse myself, find out which other dependent packages are required (like Java runtime) and then follow someone’s guide to make it work by passing magic parameters to the launcher.
  3. My favorite broswer Chrome is not available on Linux. There is ofcourse Chromium which still has problems with Flash and Printers.
  4. Trying to set up dual screens was a bit troublesome. Ubuntu couldn’t identify the best native resolution for my external display and I had to find out how to add the resolution myself. Not to mention about setting which display is primary and what is the location of the other display compared to primary one. It’s still a complete mistery to me.
  5. Configuring apache. Don’t get me started. How to start apache? Where’s the main config file? Oh it’s different from Windows! How to enable mod rewrite? How to add a virtual host? Had to learn about the a2* utilities familly to solve my problems. It’s easy when you know how they work and that they exists, but if you don’t …
  6. When my laptop suspends and recovers it has problems accessing samba network shares. Still not solved.
  7. What is the shortcut to go to Desktop? What is the shortcut to logout? Was hoping it would be the same as on Windows. It’s not. Though it’s not a big issue.
  8. Ubuntu has no nice default screensavers (joking)

Enough with the bashing. The pros:

  1. Superior speed. Starts a lot faster that Windows. Especially if compared to my Lenovo laptop which comes with a lot of preinstalled crap applications which I didn’t want in the first place.
  2. Lot’s of problems solved. Audio, USB, printers, network sharing, video playing just works.
  3. Amazing package management solution. Whatever you need, just search and install. And you are sure the packages are clean from viruses (hopefuly)
  4. All opensource tools are available. When a package is not available it’s possible to find a 3rd party build or build it yourself. Helps a lot when you need that one magic extension.
  5. A lot more easy to set up a development environment than it was before. I have never installed phpmyadmin that easy.
  6. Virtualization is easier than ever. You can even have windows applications running along with Linux ones.
  7. Some applications are more well built. Like Skype for example allows me to disable contact request spam notifications. Which is a huge problem on Windows nowdays.
  8. Completely FREE.
  9. Looks nice! Has lovely eye-candies! The Cube!

So far that’s my experience. I’ll keep using Ubuntu at work seeing how it goes. My main wish for Ubuntu is for it to be 3 times more faster than it already is. Just like Chrome.. All in all I must say Linux desktop has advanced a lot further than expected by me. I would highly recommend it for schools, universities and home users who don’t play games.

, , , , Hide

Apr/09

21

Adding a virtual host on apache windows xampp

Setting up virtual host on windows using apache and possibly XAMPP is easy but may cause some trouble to the inexperienced. To setup a virtual host follow these steps:

1. Locate your vhosts file. On my PC it’s: D:\apache\conf\extra\httpd-vhosts.conf
2. Uncomment the following line: NameVirtualHost *:80
3. Add your virtual host definition:


     DocumentRoot "D:\www\myproject\"
     ServerName myproject.com
     
          Allow from all
          Options +Includes +Indexes +FollowSymLinks
          AllowOverride all
     

4. Open a file name hosts located at: C:\WINDOWS\system32\drivers\etc
5. Add the following line: 127.0.0.1 myproject.com
Check that for project path correct slashes are being used. Apache seems to not understand \ slashes and instead wants /. If you try and start apache from a command line it may output something like this:

Syntax error on line 45 of D:/XamppLite/apache/conf/extra/httpd-vhosts.conf:
DocumentRoot must be a directory

, , , , Hide

Sep/08

3

Linux like terminal on Windows!

Have you ever wanted to make your CMD window fullscreen? You did? And it didn’t work? Too bad. Have you ever wanted to search something in your files using grep, awk, less, sort? Have you ever tried to mass rename your files ? You did? And it didn’t work? Too bad.Be worried no more! First you need Cygwin. Cygwin is a Linux-like environment for Windows. It also provides you a lot of tools which provide linux look and feel. Install cygwin while changing none of the default settings. Now you can do something like this:

Cygwin Terminal 

Notice that this is a simple CMD like window but it now has some nice colors and new shiny tools.Now in order to make it even more cool you need a tool named PuTTYcyg. PuTTYcyg is a patched version of PuTTY that, in addition to telnet, rlogin, ssh, and serial connections, can also be used as a local Cygwin terminal instead of the Windows console. Download the package and unzip it somwhere. I put it in C:\Program Files\puttycyg. Now double click on a file named putty.exe. Now fill everything as in the image bellow and press save.

 cygwin putty configuration 

Now make a shortcut of this putty.exe on your Desktop. And change it’s properties like this:

cygwin putty terminal shortcut  

Click apply and you are ready to go myfriend! Double click on the shortcut and you should be able to do thins like this including full screen resize yay!

putty cygwin terminal 

Now .. Begone CMD!

, , , Hide

Find it!

Theme Design by devolux.org