home :: tech

News from the front

Rule 34

Did xkcd create the web interest in rule 34 or was it the other way around ?

xkcd comic 505 - A bunch of rocks

/tech | edited on 2008/11/17 -- permalink

Information safety rip-cord

Here’s an idea for HD manufacturers, add a crypto chip that encrypts everything that goes into the platters. Then add a physical rip-cord (or tab, something) that destroys the crypto chip.

When you bin the disk and send it for mandatory recycling all you have to do to make sure your data is safe is pull the wipe rip-cord.

/tech | edited on 2008/11/15 -- permalink

Text Editors for OSX

For when you can’t buy TextMate.

/tech | edited on 2008/11/01 -- permalink

Aspire One notes

(cross)Building the kernel on a real machine

  1. Grab the kernel source package from the Acer AA1 Linpus repo. If your version (uname -a) for some reason isn’t 2.6.23.9lw fish around to the correct package.
  2. Pick a directory to hold your AA1 stuff, say ~/acer, and unzip the source into it
  3. Copy the kernel config from /boot/config* on your AA1 (mine is config_080627 - might change on future updates) to your real computer
  4. Go into the kernel source dir and say

    export INSTALL_MOD_PATH=~/acer/
    export ARCH=i386 # this is only important if you're a diferent arch
    make mrproper
    
  5. Copy the you got from the AA1 (config_080627) to .config and say

    make oldconfig
    make modules
    
  6. Now you should have all the “default” modules built. If you don’t, you screwed up somewhere
  7. Say make menuconfig and chose the modules you want
  8. Say

    make modules
    make modules_install
    
  9. You new modules are in ~/acer/lib/… . Copy them over to the /lib/modules tree in the AA1

Note: This will not let you use VirtualBox or VMWare or the likes on the AA1 as you didn’t setup a build tree there!

Instaling extra packages

The very first thing you do is

yum update fedora-release

cause there was a little snafu with the security of the signing keys and that will transition you to the new repo (8.5) signed with the new keys. Remeber to be careful with what you install and do not do yum update.

The “extra” stuff like mplayer comes from DAG instead of freshrpms just to make things a bit more insteresting….

Getting rid of the broken NetworkManager

NetworkManager and nm-applet that shipped originally nearly worked but an updated totally broke it and I was ifuping eth0 for life and network. Good news you can update do fc8-updates NetworkManager which actually works (apart from nm-applet dying on susped which I haven’t figured out yet) and knows about some 3G cards.

  1. Get current gnome-menus and redhat-menus from a fc8 mirror
  2. Say

    rpm -Uvh --force --justdb gnome-menus-2.20.2-1.fc8.i386.rpm redhat-menus-8.9.11-2.fc8.noarch.rpm 
    #replace the version numbers with whatever's current
    

    The param —justdb is very important. NetworkManager requires these but they conflict with the linpus menus so you tell rpm to record on the database they’re installed but never actually write any files to disc.

  3. Say

    yum update NetworkManager
    
  4. Edit /etc/rc.d/slim/nowait.sh and move the line

    sudo /usr/bin/nm-applet &
    

    from around 1/3 up to the end of the file. In my boot nm-applet was starting before gnome-keyring and it couldn’t fetch wireless keys. This delays nm-applet startup a bit and WorksForMe.

Not using the Acer Email client

The “Acer Email” that comes preinstalled on the AA1 looks like an old version of Evo. Don’t use it as it’s a un utter piece of crap. As an example, if you use an IMAP server that says explicitly it doesn’t want plaintext passwords on an unencrypted connection Acer Email will send your password in the clear anyway. That will not only not work but also means there’s a good chance someone else is reading your email if you did it over a open wifi.
TaoOfMac has instructions on how to install thunderbird (or any other, it’s easy as long as you can yum it) and how to edit the acer desktop menu.

Getting Bluetooth HSDPA to work

First, you need the bluetooth kernel modules. You can either build them yourself as I instructed above or you can get my bluetooth modules pack and unpack it as root into /lib/modules/2.6.23.9lw/kernel/drivers/net .

Then you need the bluetooth stuffs. Do

yum install bluez-libs bluez-utils bluez-gnome

then edit /etc/rc.d/slim/nowait.sh and add

sudo /etc/init.d/bluetooth start

after the udev-post line. Execute the bluetooth start command on a shell and start the bluetooth-applet.

Pair your phone your the AA1 using the bluetooth applet. Go into preferences, make your computer discoverable and add it from your phone. You should get a PIN dialog on both sides. Proced as usual.

Go into a shell and do

sdptool  search DUN

you should get something back like (if you don’t try making your phone discoverable)

Searching for DUN on xx:xx:xx:xx:xx:xx ...  
Service Name: Dial-Up Networking
Service RecHandle: 0x1004f
Service Class ID List:
  "Dialup Networking" (0x1103)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 2
Language Base Attr List:
  code_ISO639: 0x454e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Dialup Networking" (0x1103)
    Version: 0x0100

Edit /etc/bluetooth/rfcomm.conf and add

rfcomm0 {
bind yes;
device xx:xx:xx:xx:xx:xx;
channel 2;
comment "My Phone";
}

where xx:xx:xx:xx:xx:xx and chanel number are copied from the output on the command above. Execute

sudo /etc/init.d/bluetooth restart

Start system-config-network (yum install it if you didn’t already), go to the Hardware tab, press New and fill in /dev/rfcomm0 on the Modem device input, press OK this should be your Modem0. Go back to the Devices tab, press New, give a nickname to your new connection and check “Allow all users to enable and disable”, go to Advanced, choose Modem0 as your modem port and fill in the appropriate GPRS config line for your provider on modem initialization string,

AT+CGDCONT=1,"IP,"internet"

in my case.
Save and exit system-config-network. If you followed the instructions correctly and I didn’t leave out anything you should be able to do on a terminal

ifup yourconnectionnickname

and ppp0 should come up.

I tried long and hard to get NetworkManager to work with bluetooth dial up network on my phone, failed, decided it would be way to much trouble hacking it in and went low tech. There’s a nifty (albeit slightly broken) xfce4 applet called modemlights that’s perfect for the job. Install it

yum install xfce4-modemlights-plugin

and add it to your panel

xfce4-panel -a

The current version is buggy and ignores Device so you have to fill in /sbin/ifup yourconnectionickname and /sbin/ifdown yourconnectionnickname on the command inputs. Your lockfile should be /var/lock/LCK..rfcomm0. Done, clicking the little phone icon on your pannel should bring up the connection.

/tech | edited on 2008/10/26 -- permalink

New MacBooks

new macbook 13 Apple launched new MacBooks that make the MBP I’m using look and feel like a toshiba.

Bastards

/tech | edited on 2008/10/15 -- permalink

Google Chrome

Google came up with a really cool idea about a new WebKit based browser with process separation and suitable to run “webapps”. I’m non plussed cause I know all about Fluid.app and have that already.

The V8 javascript engine on the other end seems really interesting. On the even other hand, compiling javascript into machine code sounds scary. But it will probably be exceedingly fast so it might all be very interesting in killing off stuff like Air.

On a side note, Google decided, off the cuff, to release a desktop browser pointed at webapps based on the same render engine used on Android and shipping with Gears. All this happens within weeks of release of Android. This probably means a shift in focus in the whole google apps away from Firefox to Google Chrome and a shiny new interface to be released in sync with the Android 1.0 launch. Bad news for Mozilla. Maybe good news for Symbian. Who knows!

/tech | edited on 2008/09/02 -- permalink

Git!

OMFG! I just converted to git. Why, cause setting up a svn repo is a pain and eclipse sync is just next to useless. git has the excellent feature of being totally painless to setup and allows me to work seamlessly on the laptop well way from my intranet.

/tech | edited on 2008/08/10 -- permalink

Canon S5

Got a new Canon S5 to replace my ancient S1. The main reason for the swap wasn’t the ancient bit but the being broken bit. As far as I can tell it’s just the sensor that went bad, lens and display are clearly working but only noise comes out on the card side (btw, if anyone is interested I can sell the S1 as-is).

The concept is basically the same but brought into this century with a (real) 8Mpx sensor, the glass kept IS and was upgraded to 12x, the memory changed from CF do SDHC and the LCD is larger and more useful. The viewfinder is basically the same and so is the general usage.
One non obvious change is the body being a bit fatter as demonstrated by not fitting correctly into the S1 slot on my camera bag. Other non obvious changes were due to about 6 years of DIGIC development, the S5 as face detect which actually works pretty good to my amazement and ISO1600 which is a crappy as expected. The glass is about the same quality as the S1 (but 6-72 instead of 6-60) and shows some magenta aberration on the edges of the image on bright areas when the zoom is fully extended. Otherwise it’s all good.
The lens cover is like a reflex lens cover instead of sticking just by friction which i guess will work better than the S1.

The only annoying thing is the accessory ring changed from the S1 which means I have to buy a new adapter to use 55mm stuff. So, If anyone is interested in a LA-DC52E conversion lens adapter for the S1 (and G1 to G3 iirc) i’m willing to sell mine. It’s part of the LAH-DC10 kit (adapter+parasol), which I can sell complete.

/tech | edited on 2008/08/10 -- permalink

TWiT 154 and MS marketing

On TWiT 154 the guys focused on how bad the mojave experiment is on changing the common (correct) idea Windows Vista is a pille of dung. They comment the whole thing is centered on how people think Vista is bad and instead of “wow, it’s actually good”.

That reminded me of a Microsoft campaign for some type of managed service or suport service where an office worker works into the wee hours of the night geting consistently more disgruntled at his computer until right at the end when he’s trying to save or print the computer crashes and he loses everything. So the main idea of the campaign is “Microsoft software is unreliable crap that will screw you at the worst of times but if you throw more money at Microsoft they promise they’ll come in and make slightly less unreliable”.

I’m sold!!!

/tech | edited on 2008/08/04 -- permalink

laziness

This is the first article on a three part series about the virtues of a programer.

Laziness in this sense goes a good bit beyond phisical laziness. I’ll demonstrate with a short story that sumizes the point.

Back in undergrad one of the unix/c course assignements was writing a program able to solve hanoi towers. The point of the exercise was learning about signals and probably IPC. I forget.
As I walked by the row of vt220s my classmates were particularly busy coding 3 page functions choke full of switch/case and if/else structures. I couldn’t help being amazed at how industrious and hard working they were. And i mean that in the worst possible way.

I got home and stared at the ceiling for about 5 minutes (undergrad!), grabed the keyboard, coded about 7 lines and it worked on the first build. Let’s face it, it’s pretty hard to mess up just 7 lines.

When i went in the next day a good deal of my colleagues were elbow deep debuging a few hundred lines of spagetty code. They got there by being hard working and the wrong kind of lazy which is comonly called being an idiot.
Presented with a task they jumped right into it cause thinking is hard and they much prefered 2 or 3 hours of mind numbing coding. Also, spewing out klocs made them fell productive and geting work done.
I, on the other hand, would rather listen to a celine dion record than spend those 2 hours coding that drivel. So I Iazied out and changed the problem from solving hanoi towers to what’s the smallest amount of code that can solve hanoi towers.
At the other side of the process i ended up with a couple of for loops and a decision matrix. Got a boundry condition wrong ? Debug 5 lines. Piece going left instead of left ? Put the right decision in the matrix. How can you even consider unrolling the loops manually ? Crazy talk!

However, let’s see this from the manager point of view.
First pass: buttoned down developer working hard, weird developer chating on messenger.
Second pass: buttoned down developer still working hard, weird developer appears to be sleeping.
Third pass: buttoned down developer still working hard, other guy gone.
Next morning: buttoned down developer still working hard (debuging his own mistakes), other guy not there.

And that’s why most companies suck.

/tech | edited on 2008/08/01 -- permalink
Archive: