Programming Practices

As I have a lot of time on my hands these days I tend to stumble on some interesting stuff in my treks through the Widely Wasteful Wilderness (WWW or World Wide Web). While reading a UNIX book, these days I have this craze for UNIX and Linux, I stumbled acroos this…

More of the Unix philosophy was implied not by what these elders said but by what they did and the example Unix itself set. Looking at the whole, we can abstract the following ideas:

If you’re new to Unix, these principles are worth some meditation. Software-engineering texts recommend most of them; but most other operating systems lack the right tools and traditions to turn them into practice, so most programmers can’t apply them with any consistency. They come to accept blunt tools, bad designs, overwork, and bloated code as normal — and then wonder what Unix fans are so annoyed about.

Especially for a core windows guy this is so true. Frankly after using Linux I m starting to hate Windows. Although I m still a big fan of DirectX, MS Office esp Project and Excel, and Age of Empires.

Advertisements

11 Responses to Programming Practices

  1. zohair says:

    [quote]Although I m still a big fan of DirectX, MS Office esp Project and Excel, and Age of Empires.[/quote]

    Yes DirectX and Office are probably one of the (few) strong points of Windows. There is currently no open source application that can offer the same features as Project, that at least I have seen. Of course you can run MS Office, Project and Excel included, under Linux using Wine, or crossover office.

    I did try making a little 2D game using the SDL [http://www.libsdl.org/] library on Linux. Its a bit low level compared to Direct Draw, but its way more simple, dispensing with the cumbersome COM models. I managed to get just a little bit into it though, before dropping the whole project. The good thing about it is that many users have contributed add-on libraries for SDL making life a lot easier. You remember how we had to write our own bitmap loader in DirectX? Well, there’s functions in SDL that handles that already. In fact, there’s functions to handle PNGs as well!

    Whats more, SDL is also available on Windows, which means your code SHOULD be cross-platform. Although I havent tested this.

    About Direct3D, I guess the only contender is OpenGL here, and any other engines based on OpenGL like Ogre. I havent used any to be able to pass any sort of judgement; but if Doom3 and the upcoming id Software engines are any indication, it should be able to hold up to it.

  2. Safiullah says:

    Man are you telling me Doom 3 can run on Linux without Wine? if that is so gimme the Link. I wanna try it. OpenGL is good for science and research, but when it comes to games I still say DirectX still has a higher hand plus with the initiation of xbox 360 into the console gaming elite, that point has been solidified.

    And I to tell you the truth I didn’t like Wine at first, But then I realized the the whole of Linux footprint in memory is so less than that of windows that I think it can pull it off. Hey, whty the heck don’t they make something like an embedded Windows Virtual Machine or better yet, Windows Compatibility thingy to make the gamers life easy on Linux, Every time I need to play Crysis I need to reboot my goddamn box and start that dreaded windows XP.

    Did you seee vista? it has an even bigger footprint, but some how games run quite well on it, even Crysis. I had the 64-bit version until my system drivers crached and I had to format.

    But coming back to point….. These rules are so golden that I think I should switch back from Microsofts Hard core C++ shit to plain old Linux C.

  3. zohair says:

    Man are you telling me Doom 3 can run on Linux without Wine?

    erm… not exactly. Doom 3 has a native binary for Linux. I was talking about Doom 3 being OpenGL based. About OpenGL being for science and research… guess again :
    http://www.ogre3d.org/
    http://cubeengine.com/

    …don’t they make something like an embedded Windows Virtual Machine
    Done. Check out the multiple virtualization frameworks available for Linux (and other OSes), including, but not limited to :
    http://en.wikipedia.org/wiki/Vmware#Products
    http://en.wikipedia.org/wiki/Xen

    … until my system drivers crached and I had to format.
    I see not much has changed since my days on Windows 😛

    I should switch back from Microsofts Hard core C++ shit to plain old Linux C.
    C++ isn’t at all bad. Almost all graphical programs you see in Linux are based on C++. Many console programs too. But the point is that you have the choice to NOT build a new program with a GUI and everything; rather use the command line itself.

    For example, I needed to download some fonts recently. Namely these:
    http://www.figlet.org/fontdb.cgi
    The links on the main page lead to a separate page with the actual link to the font. I would have had to do this for each and every font file! This is just too cumbersome to do in Firefox, I dont know if there is an extension to do this. Besides it would have taken me too long to find a utility to solve this.
    So what did I do? I downloaded the page, ran grep on it to extract the links, cut the links up and edited them to lead me to the actual font and fed this list of links to wget which downloaded all of them and put them neatly in a directory.
    Total command lines used: 2
    Total minutes to write and debug the commands: 1.5

  4. zohair says:

    dude why is my comment not coming up? :/

  5. Safiullah says:

    Which comment…. It takes time to some times update. Try again.

  6. zohair says:

    Responses.

    Man are you telling me Doom 3 can run on Linux without Wine?

    erm… not exactly. Doom 3 has a native binary for Linux. I was talking about Doom 3 being OpenGL based. About OpenGL being for science and research… guess again :
    http://www.ogre3d.org/
    http://cubeengine.com/

    …don’t they make something like an embedded Windows Virtual Machine
    Done. Check out the multiple virtualization frameworks available for Linux (and other OSes), including, but not limited to :
    http://en.wikipedia.org/wiki/Vmware#Products
    http://en.wikipedia.org/wiki/Xen

    … until my system drivers crached and I had to format.
    I see not much has changed since my days on Windows 😛

    I should switch back from Microsofts Hard core C++ shit to plain old Linux C.
    C++ isn’t at all bad. Almost all graphical programs you see in Linux are based on C++. Many console programs too. But the point is that you have the choice to NOT build a new program with a GUI and everything; rather use the command line itself.

    For example, I needed to download some fonts recently. Namely these:
    http://www.figlet.org/fontdb.cgi
    The links on the main page lead to a separate page with the actual link to the font. I would have had to do this for each and every font file! This is just too cumbersome to do in Firefox, I dont know if there is an extension to do this. Besides it would have taken me too long to find a utility to solve this.
    So what did I do? I downloaded the page, ran grep on it to extract the links, cut the links up and edited them to lead me to the actual font and fed this list of links to wget which downloaded all of them and put them neatly in a directory.
    Total command lines used: 2
    Total minutes to write and debug the commands: 1.5

  7. zohair says:

    damn it. Check your spam checker I think its acting up. I’ve written the reply to your large comment twice, and its not showing up.

  8. zohair says:

    ok i’m emailing the reply. I dont understand why your site won’t show my comments :/

  9. Safiullah says:

    Let me check my Filters

  10. safiullahhussaini says:

    The thingy was up with my Askimet. Thats cool…. where can I get the Linux version of Doom 3.
    I m wondering when will they port Crysis onto Linux?

  11. zohair says:

    I’m not sure but I think id Software released a download of the linux binary. You needed the Doom 3 cd to actually run it tho.

    I haven’t run it so I dont know how good it is. Mostly because my laptop does not have a graphics card.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: