"; */ ?>

tutorials


16
May 07

Hacking Aproach: NVIDIA Driver on Ubuntu 7.04 Feisty Fawn

nvidia driver ubuntuNeeded to install Nvidia driver for my Feisty Fawn (Ubuntu 7.04) box. Googled for a "how to". Noticed that all "how to"s in www follow one of three scenarios:

"Here is a tutorial on how to install Nvidia Driver…":

  • Make sure you know whether you card belongs to "1.0-71xx series" or "1.0-96xx series"
  • Get the driver’s installer  from nvidia site
  • Run the installer
  • Change the device driver from ‘nv’ to ‘nvidia’ in xorg.conf
  • You’re good to go"

                      OR

  • # sudo apt-get install nvidia-glx nvidia-kernel-common
  • # sudo nvidia-glx-config enable
  • You’re good to go

                      OR

  • Download this envy script
  • Run it
  • You’re good to go

    As you can see, there are multiple ways in Linux to solve a single problem, and it is wonderful, besides when none of them work. Yea, none of the above worked for me. I either had "GPU version mismatch – The 1.0-9755 NVIDIA driver will ignore (WW) NVIDIA(0): this GPU." or "Failed to load nvidia kernel module" or that "envy" stuff that said "my OS is not supported", etc..

I solved the problem and just wanted to share with everybody out there who might struggle, so you don’t.

I took a very "dirty approach" and did the following:

I knew my card falls into "1.0-96xx series" list by nvidia, so I went there and downloaded that installer.

Then I did:   sudo rm -rf `locate nvidia`   to make sure I have NO traces of any kind of nvidia stuff that came (?) with a clean Feisty install. (if locatedb is not populated, you can do   sudo find / -name "*nvidia*" -exec rm -rf {} \;   this will definitely clean your system from all nvidia guests)

Make sure if you have copied your driver to the directory with (or part of a) name "nvidia" rename it before deleting all the "nvidia" pieces:   mv nvidia/ myvidia/)

And only then, after I ran the installer from "nvidia", my GeForce MX 400 smiled broadly :)

Happy hacking!


14
May 07

KISS that Technology by Learning

So you need to learn (about) this technology… So you go to google… So you spent X minutes (hours? days?) to find a good candidate-article (tutorial, how to, step-by-step guide, etc.)… So you finish reading it… and most of the time you doing what? – exactly!  – going back to google and keep searching.

More often than not there are two main things that we are looking for when we need to learn something new:

  1. We want to learn it fast
  2. We want to learn it fast

See the difference? :) Here it is – the "first fast" goes for the quality of content that a source has to offer. The better the quantity, the more we learn, the faster we learn. And the "second fast" goes to the amount of time we search for that source of knowledge.

The "first fast" is going to be solved by only dealing with SIMPLE tutorials/guides/ideas about many simple and comlex topics. Simplicity is the key to solve "the quality of content" problem. Think about an IBM Redbook on something you do not know about, let’s say web services. Although it is a great book – lot’s of content – it is a very poor example of an efficient tutorial (not for all, but for most), it just has too much and will take hours to go through. Most of the time a redbook will make you quite sleepy on the page number 24 (my own observation).

And for comparison take this picture from soaspecs.com:

webservices through uddi, wsdl and soap

and spice it up with "SOAP::Lite for Perl" quick guide.

A combination of the two (pic and guide) will take you 5-10 minutes to go over and will make you understand what/how/why/etc.. about webservices. Although the guide is Perl based, it will by no means distract you from understanding the material even if you are not familiar with Perl, why? Because it is SIMPLE, that’s why.

In order to solve the "second fast", I would like to speak to everybody who is going to read this post. If you have a very cool and SIMPLE tutorial, how-to, guide, etc.., please share it with everybody by going to the comments section of this post and putting one or more links to it, or ideas where to get these very simple tutorials.

Later on I will compile this list, and either post it on a different website (if you like, I can put your name as a contributor, with a link to the tutorial/idea and your website, if you have it) or I will create a different post. This will be solving the "second fast" – decreasing the time of searching for the right source.

Apply yourself – KISS that technology! :)

 


7
May 07

The Seven Stages of Expertise in Software Engineering

software engineeringMy friend Deep, who is a J2EE architect, sent me this article to "use it as a benchmark every time I am asked to rate my skills as a software engineer". I found it very cool and right away it helped me to see people on the project I am currently on in a very efficient and "simply simple" (KISS) perspective. I will definitely revisit these stages in the future to see what stage I am on, or between which stages I am at.

Here they are – The Meilir’s Seven Stages of Expertise in Software Engineering:

Below is a part of the article written by Meilir Page-Jones for Wayland Systems Inc.
I spoke with Meilir, and with his permission I am posting his wisdom here

Stage 1: Innocent

A Stage 1 may not have heard of Software-Engineering techniques. Or — more likely nowadays — he may be vaguely aware of their existence but may not see their possible relevance to his situation. Indeed, he may be only dimly aware that there are any software-development problems in his shop. You may find it incredible that Stage 1s could exist in the 1990s, but they do. And the reason stems from the way in which software complexity evolved.

Software became insidiously more and more complex in the 1970s and 1980s as users demanded more and more sophisticated systems be installed on the more and more powerful hardware that became available. Yet there was no sharp transition. The earth was not hit by a Complexity Asteroid in 1975 that suddenly made software three orders of magnitude more complex and cast our reptilian development techniques into extinction.

I call the way in which software complexity actually increased “Frog in the Pan.” This is because although a frog will jump out of a pan of hot water, a frog that is placed in a pan of cold water and slowly heated will fail to leap forth and will actually boil to death. The temperature gradient is so gradual that there will never be a point at which the frog declares: “Boy, it’s suddenly gotten hot in here! I think I should hop out.” (Before I get into deeper trouble from animal-rights folks, I hasten to add that this analogy is apocryphal. I’ve never tried the experiment and I don’t recommend that you do so either !)

Many Stage 1s are experiencing “Frog in the Pan” and are trying to tackle problems of the 1990s with approaches of the 1960s and 1970s, without realizing that the problems they’re facing are the very ones that modern Software-Engineering techniques were created to alleviate.

Stage 2: Exposed

Stage 2s have noticed that the water is getting decidedly warm, if not downright hot. So they are actively seeking Software-Engineering techniques that will get them out of the pan or at least reduce the heat. Stage 2s may survey magazines, confer with colleagues or attend one-day overviews of the techniques. Their interest level is high but their knowledge level is low, being limited to a few terms and definitions and not based on any practical Software-Engineering experience.

Stage 3: Apprentice

Stage 3s have attended one or two 5-day workshops on Software-Engineering techniques. In these workshops they tackled small but realistic case studies that resembled their own projects in miniature. The case studies provided valuable kinesthetic reinforcement of the formal lecture material and were thus indispensable. However, the case studies’ apparent realism conveyed to the Stage 3 a confidence that is often unwarranted.

If a Stage 3 absorbs everything from a seminar, then he is minimally equipped to tackle a true, full-sized project in the corporate jungle. Usually, however, a Stage 3 does not grasp everything or has difficulty scaling the techniques up from a case study to a real project. You could say that most Stage 3s know just enough to be dangerous!

Stage 4: Practitioner

The rite of passage to Stage 4 is the use of Software-Engineering techniques on at least one significant project. Achieving “Stage 4-hood” is for many people the most difficult transition of the six transitions between stages. The fledgling Stage 4 is asked to take untried (by him) techniques and apply them to a corporate project with the usual demonic cocktail of politics, deadlines and changing requirements. At the same time, he is attempting to recall what he learned in class and scale up the examples 10- or 100-fold. He continually needs consulting advice, without which he will encounter a series of minor setbacks or major failures. Since many people throw up their hands at this point and revert to their old mediocre but familiar ways, a large proportion of Stage 3s never make it to Stage 4. If an entire project is peopled with Stage 3s, then it’s highly likely that the project itself will fail and the Software-Engineering techniques will be publicly pilloried and then abandoned. 

Stage 5: Journeyman

Stage 5s have made it. Their experience of Software-Engineering is “latched” in place and there is little risk of their reverting to the past. In the Stage 5 the Software-Engineering techniques yield for the first time the productivity the marketing folks promised; and on each successive project a Stage 5 further hones his skill and enhances his productivity. A Stage 5 is self-sufficient – more often the source of Software-Engineering advice than its recipient.

Stage 6: Master

The Stage 6 not only is an adept technician, but also possesses a profound methodological foundation. Beyond the “whats” and “hows”, the Stage 6 knows the “whys” of Software Engineering. This depth allows him sometimes to break a surface rule, while adhering to a more fundamental methodological principle. The Stage 6 is a good instructor because his theoretical and practical knowledge give him the wherewithal to tackle difficult student questions.

Stage 7: Researcher

The Stage 7 is concerned with delivering the latest developments in Software Engineering to a wider audience, via books, articles and conference appearances. The Stage 7 looks out for flaws in contemporary Software-Engineering techniques and for consequent ways to improve the techniques. He also scans the horizon for new problems towards whose solution Software Engineering can be extended and generalized. The Stage 7 is at a methodological pinnacle.

These Seven Stages of Expertise are valuable in their own right. You might think about a Software-Engineering technique that you know and consider which of the stages you are in with respect to that technique. You may also decide what (if anything) you should do to progress to the next stage.

However, there are organizational implications behind the Seven Stages. Below I discuss four of these: The Productivity Curve, Pilot Projects, The Critical Consulting Core and Ephemeral Technology.

 

Below is a "Stage-based Productivity Graph" that was compiled by Meilir based on his clients’ statistics:

Stage-based Productivity Graph

Software Engineering Stages Productivity Graph

10
Apr 07

Top 10 Windows XP shortcuts

Always very useful to have/know these if you are using Windows XP. The best and the easiest way to see how useful they are is just to try them out as you go along the list:

windows key – an example of a <Win Key> that is used here in the list

    1. <Win Key> + e = Opens “Windows Explorer”

    2. <Win Key> + r = Opens “Run command” – e.g. where you can type “cmd” and press enter

    3. <Win Key> + Pause/Break key = Opens “System Properties”

    4. <Win Key> + f = Opens “Find Files”

    5. <Win Key> + d = Minimizes all windows – shows desktop – press it again to get back to original state, or try <Win Key> + Ctrl + M

    6. <Win Key> + l = Locks Computer (Keyboard)

    7. <Ctrl> + <Shift> + <Escape> = Opens “Task manager”

    8. <Shift> + <Del> = Removes file(s) without sending to Recycle Bin

    9. <Alt> + <Enter> = Shows file(s)/directory(ies) properties

    10. <Alt> + <Prnt Scrn/SysRq> = Saves snapshot to the clipboard of the current active window only

Extra cool stuff:

    <Alt> + <Esc> = Activates windows in the order that they were opened

Below two shortcuts are not necessarily Windows XP’s – they are for Firefox & IE but very useful:

    <Alt> + d = Selects browser’s Location Bar, now type google and press
    <Ctrl> + <Enter> = Attaches www. and .com to whatever you just typed, and submits it to the browser

Very simple – not for gurus, but very useful!


10
Apr 07

MySQL: Reset Lost Root Password

Here is a quick Step-by-Step “how to” which helps restoring MySQL root password that was lost/forgotten.

It happens to everybody, especially if several distributed (different) systems are maintained, where the password is not the same. Here is what needs to be done to restore it:

Step 1: Stop MySQL daemon if it is currently running

Depending on the operating system MySQL is installed on, the daemon can be checked/stopped differently. Here is an example on how to do it in Unix-like systems.

[ NOTE ]: You might need to run it as a Unix System superuser (root) - depending on 
          how the system is configured, and what permissions your Unix account is granted)

Here is how to stop/kill the existing mysql daemon, in case it is running:

      ps -ef | grep mysql      - checks if mysql/mysqld is one of the running processes.
 
      pkill mysqld             - kills the daemon, if it is running.

Note: if pkill (’process kill’) is not on a particular Unix system, use kill -9 ‘pid’, where ‘pid’ corresponds to processes that were found with ps -ef | grep mysql

Step 2: Run MySQL safe daemon with skipping grant tables

      mysqld_safe --skip-grant-tables &

Step 3: Login to MySQL as root with no password

      mysql -u root mysql

Step 4: Run UPDATE query to reset the root password

In MySQL command line prompt issue the following two commands:

      UPDATE user SET password=PASSWORD("ualue=42") WHERE user="root";
      FLUSH PRIVILEGES;

“ualue=42” is a common password for “The Hitchhiker’s Guide to the Galaxy” people which reads “Ultimate Answer to Life, the Universe, and Everything=42“

Step 5: Stop MySQL safe daemon

Follow the first two steps, but this time kill (pkill) “mysqld_safe” instead of “mysqld”

Step 6: Start MySQL daemon

Depending on the operating system (Unix-like examples):

      /etc/rc.d/rc.mysql start

OR

      /etc/init.d/mysql start

OR

      /etc/rc.5/mysql start

etc.. check existing MySQL configuration

Step 7: Root password is reset and ready to use

Password is reset. Privileges are flushed. Start MySQL and login as root with the password set in step 4:

      mysql -u root -p mysql

Note: sometimes (most of the time) ‘root user’ privileges are required for the system (OS) in order to stop/start processes

what is next? Reset Lost Password in Sun Application Server