Posts Tagged ‘linux’
I used Ubuntu 10.04 so that I know I don’t need to upgrade for the next four years.
1. Follow Linode’s excellent ‘Getting Started‘ instructions.
2. Add a new user and add them to the sudoers file.
3. Use Josh’s ‘Railsready‘ script to install Ruby etc.
Rather than using RVM to create gemsets, I prefer to ‘Vendor Everything‘, so I didn’t use RVM to install Ruby.
4. Install Passenger (this will also install nginx)
In this way you can obtain the list of the ten oldest processes:
ps -elf | sort -r -k12 | head -n 10
To sort processes by memory usage use “Shift M” when running.
Use ‘c’ to show full path for command.
For other useful ‘top’ configurations.
Every now and then it is forcefully driven home to me that Linux is not yet ready for mass adoption. I have been trying to set up my back / forward mouse buttons on Feisty Fawn. There is no reason why this should be difficult but the official instructions are alarmingly non-deterministic! Exhortations to “experiment” are just plain annoying. Plug and Play (TM) might not be perfect but it gets the job done most of the time.
I was once a respected coder. But for 5 years I’d designed ASIC’s using Verilog (where everything happens at once) and then for 5 years I’d turned to business. And it all changes in a decade. I’d let my skills lapse and in the interim C++ had morphed to Java and then suddenly CPU’s got really fast and scripting was back in vogue.Â
I realized that my CS undergrad was quickly becoming worthless. Web programming was a complete mystery to me. (Whether that was really a problem is a philosophical question beyond the scope of a humble blog entry). Here is my road to recovery. In bullet point form amenable to PowerPoint and as buzzword compliant as possible.
Jan 1st, 2008: Resolve to brush up on programming skills.
Which language should I learn? Web development seems cool….what’s involved in that? Narrowed it down to a) the LAMP stack or b) Ruby on Rails. Do I want to be a) paid as a programmer or b) hip ?
I went with Hip. Rails it is.
Here are the steps (and mistakes) I took on the road to recovery:
- Linux – I remember that: “ls -al” and all that. It’s the sine qua non for a real programmer.
- F@(k. That’s a lot of variants of Linux. Go with Ubuntu because I’m semi-African.
- Hmm… Windows XP is standard issue at work.
- Get an old PC from my IT guy. Spend an entire day installing Ubuntu. Realize I’m now a web programmer so start again and install the server version. What the hell? What’s involved with web programming anyway. Will I be writing the client or the server?
- Call college roommate who is on “tiger team” at Yahoo. He says: “Buy Pickaxe“. Sold. In a flash of environmental sympathy I buy the PDF version. It also saves $10. Print it out on corporate printer. Double sided to save the environment.
- Need the Rails part: Buy “Agile Web Development with Rails“. We invested in an Agile software company so “agility” must be good.
- Start reading. In the interest of time and an anxiety to see the global greeting I dispense with Linux and deploy InstantRails on Windows –> Instant gratification. (Nice to see those programmer types have dropped their antipathy towards Microsoft. I’m a web programmer. Even if it’s only on localhost. (Wow: It’s only February and I could compete with Amazon if I wanted to and if I knew where to buy all the books for my bookstore)
- I have a bookstore up and running. No one can see it. That’s ok….how hard can deployment be.
- March. Deploytment is hard. People don’t recommend Windows. Could I be the only person writing Ruby code in a Rails environment on Windows XP. Seems to be from my google searches.
- Let’s reinstall Ubuntu Linux.
- Install ruby gems. Rinse. Repeat. Rinse. Repeat. Check dependencies. Rinse Repeat. Rinse. Repeat.
- Install MySQL. (It’s nice that I don’t need to think too much about the database. Seems like something business people should concern themselves with).
- Stuff is working. Slow as all hell on this ancient PC but what the hell. People will wait for the page to load.
- Becoming a problem that I can only work on my hobby at work. Can’t afford another PC at home.
- VMware to the rescue. Downloading an Ubuntu VM on my home PC is a cinch. And hip. Which is important.
- Realize I need a real hosting service. (Weeks of agonizing research). Settle on Dreamhost. (I love those guys!)
- Deploy app. Hmmm…this is a f@(k1ng nightmare!
- Passenger (mod_rails) is released a few days later. I realize I’m back on the cutting edge. Deployment is now piss easy.
- www.assetcorrelation.com (Live as of June 1st, 2008 — 5 months start to finish)
- Start to harass Google to show me some organic search love.
It’s been a wild ride. And not as hard as I thought. In the end, we return to the beginning. I still hate writing test benches. Hacking is still fun. And not having deadlines is the way to go. 🙂