Updating more stuff

I have created a “Resources” page. I’ll be adding everything I produce on that page. For now there is only this article I have written as an assignment. I also have a tagging plugin for jquery that I am planning to add. TagComplete needs a lot more work to be usable. I’ll write up a readme to briefly explain how to use it. It’s quite easy actually but I want to make it really usable: Include a js file, call a function when DOM is ready and nothing more, no cryptic config options, etc. It also has a Django widget that can be used without much effort. If you’d like to figure it out yourself, be my guest, the code is on github. Or you can poke me to write that readme.

Posted in Uncategorized | Leave a comment

Can’t get Ubuntu 9.10 to boot from EFI.

It’s rather ironic that after a week of research on free software, software compatibility and protocols I was unable to get Ubuntu 9.10 to boot from EFI on my MacBook Pro 5,1 (late 2008). It’s not the fault of Ubuntu or grub2 developers. It’s Apple’s implementation of EFI, they weren’t loyal to the standards. I didn’t give up yet but I am taking a break.

You might want to know what EFI is and why I would like to “efi-boot” my Ubuntu 9.10. EFI is basically a replacement for BIOS. Using EFI, much more complex devices can be handled before the OS is booted, so we can make shiny boot loaders…

But the real reason I want to efi-boot is the fact that MBP 5,1 has two NVIDIA cards. One of them is 9600 GT the other one is 9400 GT. If Ubuntu is booted with older grub, in a special BIOS compatibility mode, it can only detect the 9600 GT. This results in an extremely over-heated system. I suspect, the undetected card is working at full capacity without doing anything. Anyway, If Ubuntu detects both cards, by the way a lot of people had success doing that, you can select one of the cards to be active without frying your system. This also fixes the battery issue, the battery lasts longer because there is no extra device to leech power in the background.

For three days, I tried gazillion different configurations, beta builds, compiled grub from source with several combinations of modules. I joined the grub IRC channel to get some help and ne of the main developers gave me an experimental version and another version that he modified specially for my problem. None of them worked. Grub just freezes after loading the kernel and the initrd image. I don’t have time to learn about EFI, BIOS or grub internals, I’ll have to wait until people figure out the problem and fix this.

Apple, why would you do this to me?

Posted in Uncategorized | Tagged , , , , , , | Leave a comment

New VPS, Nginx and PHP-FPM

I bought a VPS share from GANDI yesterday. They are the cheapest I have found, $16/month (I must admit I haven’t searched much though). Here is a sentence about them from Wikipedia:

They do not pay for publicity, but rely on word-of-mouth only. Since 2008, they also provide virtual servers through Xen technology.

They are France based and I love having a server in France, very handy for proxying through Europe. After setting up fundamental software and services on my shiny Debian 5 OS, I decided to migrate my blog from Blogger to Wordpress. I started by installing the classic LAMP stack, Apache, Mysql and PHP.

I bought a single share (means a single slice) which has 256 MB of memory, 5 GB disk (+ another 2.5 GB for system software) and 5 MBit/sec unlimited bandwidth. After setting up Apache with mod_php I was shocked to see that it would cost me 210 MBs of memory to host a single Wordpress installation. I’ve used and setup Nginx for RubyOnRails and Python/Django setups before but never for PHP. I decided to give it a try.

After following the instructions on this page to setup Nginx with PHP-FPM (PHP Fastcgi Process Manager) using 2 threads to serve my blog, I was happy to see that the overall memory usage was 66 MB. Well of course I could lower the number of child processes in the Apache config but I don’t think it would lower memory usage this much and I am really fed up with Apache’s way of threading and process management.

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

A change of development environment.

I have been developing on a Mac for 3 years (give or take). I used to do projects using RubyOnRails and PHP Frameworks. For a year now I have been enjoying Django. Ruby (and Rails), Python and PHP all come built-in latest Mac OS X (Leopard). It may sound good enough but it is really annoying to find your application broken by an interesting software update from Apple.

Or worse, if you want to upgrade the libraries you use to the latest versions, you might end up breaking some of the functionality of your system. I prefer not to modify anything in the system libraries unless it is an official update.

I like lightweight editors like Emacs, TextMate or TextWrangler. But a course in the latest semester made me use Eclipse. I am a long time Java hater. After this course I realized it’s really fun to code in Java and if it’s even more fun if you use a full-blown IDE. Some of you might think those IDEs are just crap, I used to be one of you. Maybe I am getting older, some younger programmers might still want to use Emacs . Don’t get me wrong, I love it. But Eclipse takes a lot of the weight from my shoulders (i.e. boring parts of the programming). Anyway, here is the evolution of my web programming environment:

OS: Windows -> Red Hat -> Debian -> Ubuntu -> Mac OS X -> Ubuntu -> Mac OS X

Editor
: EditPlus -> Gedit -> Vim -> Emacs -> TextMate -> Emacs -> TextMate -> Eclipse

DB Backend: MySQL -> PostgreSQL on Mac -> PostgreSQL on Ubuntu VM -> Postgresql on Mac

Programming language: PHP -> Ruby -> Python
I also use Java, C and Objective-C but they are not really work related.

Frameworks: None -> Drupal (yeah CMS) -> Rails -> Django

Since I hate modifying my system libraries, until recenly, I used to keep my Django, Python and PostgreSQL installation on a virtual machine running Ubuntu, share some folders between the Ubuntu installation and Mac OS X (So my editor running on Mac OS can access those files).

But I am fed up launching virtual machines every time I want to make a small change and I think there is a better solution: MacPorts.

I know there are some people very upset with MacPorts. But if you install the libraries you need without modifying anything in your Mac system, you’ll be fine. For example, if you are installing a new version of Apache, you shouldn’t let it run on port 80. Because there is a built-in Apache server in Mac OS X (according to vigo it may break your mobileMe sync).

Trying a lot of environments I am most comfortable with MacPorts. If you are developing using Python-Django or RubyOnRails, it will be a lot easier for you since you don’t need to modify Apache configuration. One thing to keep in mind when using MacPorts is that, you should add “/opt/local/bin” to the beginning of your PATH variable. When you install, say, a new version of python using MacPorts, the executable file “python2.6″ will be in /opt/local/bin. Just link /opt/local/bin/python2.6 to /opt/local/bin/python. That way, even if you don’t modify the original python executable in /usr/bin, you’ll be able to use the new version when you just type “python”.

Posted in Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

Apple iCal and Google Calendar synchronization

Just like a lot of people out there, I use more than one computer. I have my laptop, my desktop computer at work and various computer terminals at school… So I like to keep my data online as much as possible. The best solution for synchronization between computers is MobileMe. But I find the service expensive when there are a lot of free and really good alternatives and frankly, it is not cross platform. If I had an iPhone, I’d probably buy a MobileMe account to have all my data with me all the time and be able to access it in a very usable way. But I don’t have an iPhone and I am not planning to buy any time soon, not the 3G model.

So I stick with Google Calendar. It is very usable, web based and free. Now the best part is that it can be synchronized with iCal. In fact, it is not synchronization. Any modifications you make on iCal is instantly transferred to your Google Calendar if you are connected to Internet. That is if you are using the CalDAV. You can use Google’s Calaboration tool to easily add your calendars to iCal and keep them in sync via CalDAV.
But I have a terrible problem, the image on the left side shows how it looks when you add multiple calendars. As you can see all the calendars seem to be under different accounts, this is such a waste of space and very annoying. In a perfect world, it should be looking like the one on the right:
Maybe this requires some extension to CalDAV protocol/structure. I don’t really have any information about it. All I know is that this is terribly annoying. If you know how to avoid this mess or Google/Apple is planning to release a fix, please let me know.
Posted in Uncategorized | Tagged , , , , , , , , | Leave a comment

Fixing Low Microphone Volume Problem with PulseAudio/ALSA on Ubuntu 8.10 Intrepid Ibex running on Dell XPS M1330

  1. Open Application -> Sound & Video -> PulseAudio Device Chooser
  2. Click on the “PulseAudio Applet” on the system tray and open “Manager”.
  3. Click on the “Devices” tab, select “alsa_output.pci_8086_284b_sound_card_0_alsa_playback_0.monitor” which is the “Monitor Source of ALSA…”
  4. Click properties and set the volume to maximum (480% on my computer)
  5. Record a song using the gnome-sound-recorder for testing.
Posted in Uncategorized | Tagged , , , , , , , , , , , | 3 Comments

From MySQL to PostgreSQL

If you have been using MySQL for some time now and want/have to try/use PostgreSQL, here is an excellent blog post you should read.

The post goes over the fundamentals and some MySQL-specific details. Personally, I had a hard time when I first tried to install PostgreSQL. I was on a Mac and I didn’t like the fact that I had to add a pgsql user to the system. If you are on a Mac and a first time pgsql user, I suggest you install debian or ubuntu on a virtual machine and do your first installation on a linux environment.

Posted in Uncategorized | Tagged , , , , | Leave a comment

Mobility is a part of life

Because of my work and my studies, I have to carry my laptop with me almost all the time. I need it at work, I need it at school. If I am staying over at a friend’s I have to take it with me because I will need it for work or school the very next day. When you carry it around enough, it becomes a real problem.

I have been trying to find an effective solution for carrying my MacBook. I have been using a few different bags. I used an ordinary laptop bag with my old 15” laptop. And after a while I realized it was way too heavy on one shoulder, so I switched to a huge laptop backpack. It was a lot better than the messenger bag but I couldn’t find a backpack (for laptops) that I really liked. For some reason all of them are lacking flavor. They all have ugly colors and weird designs. So I decided to buy one of those sleeves and carry it in my regular JanSport backpack. And after carrying it around for a while, I came to a conclusion: When it’s summer it’s a lot better to use a messenger bag. Even though it’s too heavy for one shoulder, you shouldn’t be walking around too much when it’s that hot anyway, it’s better than a backpack. Because backpacks makes your back sweat way too much… So messenger bag during summer and backpack for winter is the best for carrying a laptop.

It was working great until I switched to mac and bought a 13.3” MacBook. Now I am still using the same 15” sleeve. The problem is that I noticed some scratches on my MacBook and I think it’s because of the sleeve. I don’t think it’s doing a good job protecting it from pens and other weird stuff I am carrying all the time (I’ll go into detail about this later.). It’s way too big and I think the MacBook is moving in it when I am carrying it in my backpack. And another thing is, an 15” sleeve is way too big to carry with my messenger bag. It barely fits in and there is no space left to put in anything else.

Now I am planning to buy an 13.3” sleeve. But, there are so many different brands and they are talking about a lot of different “shock-emitting technology” and stuff. This is one of those things that shouldn’t be too complicated. So I decided to buy the one that has the best looks. I am considering to buy this one or this one. I think I’ll go for the black/red one.

Leave a comment if you have any suggestions.

Posted in Uncategorized | Tagged , , , , | 1 Comment

Why I should blog

I finally decided to start a blog. Maybe the reason is this blog post. I am a big fan of Steve Yegge (his more recent blog). He is quite famous with his really long blog posts.

The main reason behind me starting this is, I consider myself one of the programmers who know how online communities and social networks work. But I realized I am a lurker. I lurk in mailing lists, I lurk in online forums. I lurk in open-source project wikis. I rarely contribute code and I never talk. So I decided to make my own contribution on this blog and my website naysaying.com. I chose this domain because I am a naysayer. That is it. I always comment about the things that, I think, are wrong and I rarely speak when I like something. I almost never find myself criticizing something when I really like it.

In this blog I am planning to talk about things that I don’t like about software, web development, gadgets, video games, books and other things I am interested in. And I will also try to talk about things that I like and go into detail about them.

After reading a lot of blogs and articles I finally accept the fact that the things we consider obvious may not be so obvious at all. So, in that context, I will be talking about “obvious stuff”. It may be boring for some of the readers and useful for others. I am not here to make everyone happy. If one thinks that this blog is boring, then one can read another blog that suits her. Internet is an ocean of blogs just as it’s a series of tubes. I am also planning naysaying.com to be a site for my portfolio, projects and a place for me to exist online.

I am a Turkish web developer and Turkish is my mother tongue. If you wonder why I want to blog in English, that is because I am a Computer Science student. Most of the people I want to work with and the online communities I am interested in, are not consisting of Turkish speakers. The papers I will be releasing and all my work will be in English because, currently, it is the default language for science (which means I also have to improve my English writing skills.).

I have been avoiding this for years. I didn’t want to join the horde for some reason, but I finally accept that one should have an online presence (Facebook is not enough, belive me.).

And… Well… Here I am.

Posted in Uncategorized | Tagged , , , , , , | 1 Comment
  • Hello, I am Fırat.

    I am a CS student from Turkey. I can't stop learning new things every day and rant about them!