2010
07.22
Now that I am using a Windows Mobile based device, it is really annoying that the media player does not have a sleep timer included. I noticed that many years ago in an iPaq PDA, and I see that nothing has changed.
When I go to sleep, I start the Windows Media Player usually with a large playlist, or even the loop function activated. I do not want, however, the device playing all night long wasting my battery… Well, it’s the very definition of Sleep Timer, ain’t it?
I put together a couple of lines of code, and made this **extremely basic** sleep timer. I did something similar many years ago for the iPaq, and now I’ve don it again. I spent more time trying to make the cab installer that the code itself:D. The code is almost worthless to put here, but I’ll do it just in case someone ones to modify it to start a different process other than the Media Player.
The “Suspend the device” function, calls the SetSystemPowerState API which according to the MSDN its effect may vary on each device, as it relies on some OEM power management implementation. It will not be necessary in most of modern devices, but I included it just in case.
Sleep Timer Installer
Sleep Timer Source Code
2010
07.14

GM750
My iPhone recently died due to a sudden deceleration against the floor.
Needing another phone while I decide which will be my next acquisition, I borrowed from my girlfriend a LG GM750 phone that she had lying around. This is a Windows Mobile 6.5 terminal and comes with the (sometimes annoying) S-Class interface from LG. It is not a super modern, super advance terminal, but it has the features I need: 3G which means web and mail, GPS and a nice battery. Add to this a couple of useful apps, and a GPS offline navigator and now you’re talking.And the best part, it was free!!.
Unfortunately there are not stable alternative roms for this model yet, so I had to change manually a couple of things that were making me unconfortable.
Read More » »
2010
06.01
Or “How to develop for the iPhone under linux”.
If you have been looking for imformation about virtualizing LEopard or Snow Leopard, you’ll probably stumble upon this two sites, which contain most of the useful information. However, when it comes to Snow Leopard, information is spread across hundreds of posts, and most of it is for MS Windows only.
There’s another attempt using empire-efi here, which didn’t worked for me.
I just wrote a guide myself about how to get Snow Leopard working under Ubuntu 9.10 and Virtualbox 3.1.6r59338 and I was about to post it. However, I found another guide, for windows, which will work flawlessly under Linux with some minor tweaks, and has step-by-step screenshots, so I guess there’s no need to duplicate the content there.
Here’s exactly what I did to get things working:
Read More » »
2010
04.18
This week KSplice published in his blog the second part of a interesting article, explaining the effect of a dangerus NULL derreference in the Linux Kernel. In the last year many of those holes were fixed in the kernel, so finding a true exploit wouldn’t be easy. It is still nice to understand how this kind of exploit works.
Here the first and second parts of the article.
2010
04.06
Are you experiencing problems with the Subclipse plugin for eclipse? Well, I am too. The solution however, is pretty straighforward.
I’m using a custom eclipse installation. The ubuntu repositories package is too old, so I always update my eclipse installation from the eclipse website. I install it to /opt/eclipse. If you’re using the default installation package, just look for yor install forlder, probably somewhere near /usr/share.
Now, I assume you installed the subclipse plugin, a nice SVN client. This client uses JavaHL libraries to communicate to the svn program istelf, and unfortunately, this libraries installation is up to you. If you do not have them, subclipse will complain about missing libraries each time you need to do somthing svn-related. So, to fix if:
- Install the javaHL libraries:
sudo apt-get install libsvn-java
- Tell eclipse where to look for them. Edit the file /opt/eclipse/eclipse.ini (or /your-eclipse-path/eclipse.ini), and locate the line:
-vmargs
Now just below this line, add the following one:
-Djava.library.path=/usr/lib/jni
- Happy coding!.
2010
04.02
Browsing around I came across this post and loved it. This deserves as many copy-paste backups as possible, so here is one more:
- “The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
- “In order to understand recursion, one must first understand recursion.” – Author Unknown
- “I have always wished for my computer to be as easy to use as my telephone; my wish has come true because I can no longer figure out how to use my telephone.” – Bjarne Stroustrup
- “A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila.” – Mitch Ratcliffe
- “There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.” -C.A.R. Hoare
- “The gap between theory and practice is not as wide in theory as it is in practice.” – Author Unknown
- “If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.” – Gerald Weinberg
- “If debugging is the process of removing software bugs, then programming must be the process of putting them in.” – Edsger Dijkstra
- “Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” – Bill Gates
- “Nine people can’t make a baby in a month.” – Fred Brooks
- “Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” – Rich Cook
- “There are two major products that come out of Berkeley: LSD and UNIX. We don’t believe this to be a coincidence.” – Jeremy S. Anderson
- “Before software can be reusable it first has to be usable.” – Ralph Johnson
2010
03.11
People at Brown University have made some thought about redisigning the paradigm of modern IDEs. They came up with an interesting idea called Code Bubbles.
You can see Code Bubbles in action here. I think it’s an interesting approach, but I’m not sure how will this system behave while debuggin complex code. Maybe the cursor starts to move all over the virtual space…
2010
02.07
Those who spend many hours in front of an IDE writing code will know how much an LCD screen can make your eyes strain.
It is not new that monospaced fonts make an overall better alignment, improving the scan speed while reading code. There are a lot of Monospaced fonts there. The one I’ve been using is called Consolas. Just google it and you’ll find a lot more. ProggyFonts, Pragmata and Inconsolata are great too. However, proportional fonts are in general a bit easier on the eye. I compensate this modifying the color scheme of my editors.
Read More » »
2010
01.28
I just needed to create an Ubuntu (9.10) USB bootable device from Osx.
First thing was, of course see if the great Unetbootin supported OsX. Not the case.
Well then. I know it can be done with dd. Should I do anything special to do it under OsX?
Read More » »
2009
12.16
I’ve been the last days trying to find the way of inserting code into a wordpress post. As I see it there are two stages for a good code rendering: Pasting the code, and showing the code, if possible highlighting the code syntax.
For the syntax hightlinghting there are a lot of plugins. Most of them use two well known syntax hightlighting engines as the Alex Gorbatchev’s SyntaxHighlighter or the Generic Syntax Highlighter (GeSHi). Both engines are great, so this is not really relevant to choose the plugin. Most of the plugins accomplish what they say, and provide more or less flexible and customizable syntax highlighting using a handy tag system.
Read More » »