April 2005 Archives

April 28

data types

The preprocessor chapter is done, and now I am on to learn about data types, enumerated data types, typedefs and so on.

I havent had a chance to skim through it so I am at least this time safe from one of my usually stupid "oh this looks easy" assumptions.

Oh, I still haven't learnt how to open a file, read from it, do some stuff to it, and then close it. This after 320 pages into the book and writing 248 programs by my count. (admittidly some are small, but nevertheless) I will get to that after 2 more chapters, then maybe I could write one #$@%^*! program that actually has some worth and does something useful.

Still quite a way to go though and it looks like by the time I finish this book it will have been a year, which is really depressing when I think about how many books students plough through each semester. I could probably do a degree in about 14 years at my rate :-)


Posted by æc♥ | Permanent Link

April 26

oh brother

My younger brother is staying with me for a while. He had a big fight with Dad and got kicked out of the house :-) He was staying with some friends but came over here one night to visit me and hasn't left yet.

I guess he will return home soon but he and Dad can be quite stubborn so we will see how long they hold out. Mom isn't worried as she told me that its peaceful at home with my brother gone and she knows he's getting well fed.

He wanted right away to use my computers so I gave him an account on my backup desktop which we set up for him in the dining room with my old 19" crt. He is pretty capable with linux and was responsible for getting me to use it over windows 98 but still bemoans the fact I use Debian and not gentoo. I told him of course he is more than welcome to find a gentoo user who is willing to give him an account on their computer, and let him move into their living room.

I installed an app called hddtemp which reports the hard drive temperatures.
orchid@morcheeba ~ $ hddtemp /dev/hda /dev/hdb
/dev/hda: Maxtor 6Y160P0: 62C
/dev/hdb: WDC WD2000JB-00GVA0: 61C
I am not sure though if this is good, bad or meh.. I tried to get cpu fan speed and temperatures working but haven't had much luck. I enabled i2a in my kernel and even made sure the right motherboard chipset was compiled in by checking the lspci output but still nothing. I should see something in /proc/acpi/thermal_zone and /proc/acpi/fan but both those directories are empty.


Posted by æc♥ | Permanent Link

April 24

power supply

I had a really loud older, cheap power supply in my desktop and suddenly it went boom, and quit working. I had to go out and get one from a local store. I told the guy the exact make and model of my motherboard and he said I can either get a similar cheap model that might last a year or might not, or get a decent Asus 400 watt model that he said work forever.

The Asus one wasn't to expensive so I figured why not and bought that one. When I got home, I noticed it had SATA connectors as well as regular power connectors. This is a bonus as my mobo supports SATA so I can get an SATA drive now and not worry about it not working. What I didn't know was that SATA requires four more power tabs on the connector going into the mobo.



My motherboard has a 16 pin connector but this power supply had 20 pins. I was frustrated becuase the store would be closed by the time I went back there and it wasnt open on Sunday so I'd have to go a a whole day without my computer. He told me on the phone, no problem, just hang the four pins over the side, and that he'd done this before. I was skeptical so I hung up and tried it.

Needless to say it didn't work, I looked at the color coded wires on the old power supply and figured it might work, if I overhung the extra pins on the other side, but I couldn't because then it would interfere with the ide controller. I called the store back and got a tech this time, and he said nope, theres no way that will work and I'd been given the wrong power supply. He did agree to drop me off the right one on his way home, so I got the correct one installed a little later.

Posted by æc♥ | Permanent Link

April 22

back to the books

My C book gets me frustrated now and then and the chapter on bit operations was one such instance. I found a decent page on the web though and actually had one of those delicious moments when things just clicked.

There's still lots more to it but for now I can put that chapter away and move on to this months area, the C preprocessor. This looks at the outset a little bit more reasonable and I have made some good progress.

I am getting one of those little KVM boxes so I can hook my spare desktop to my new monitor. I actually can already do that s the monitor has two inputs but at the moment I have no way to switch the mouse and keyboard. This KVM also does audio too which is cool as I only have the one set of speakers.

Sarah has almost reached her breaking point with no TV, shes now watching the special feature section of every DVD we have in the house, the interviews, the extra endings, the bloopers.... :-)

Posted by æc♥ | Permanent Link

April 20

paypal

Someone sent an "unsubscribe" message to debian-curiosa with the only the word "unsubscribe" in the body and subject. As you may or may not know this is not good mailing list etiquette and people get upset at the mere thought of having to read this misdirected message. Especially when the mailing list software appends instructions on how to properly unsubscribe to every email it sends.

That said, I still find it strange that mailing list veterans get so upset. Seven people responded mocking the person who wanted to unsubscribe. That's seven more emails I have to read, or at least mark as read, this is more annoying to me than the original mail. I somehow doubt that these people couldn't configure their email tools to simply mark any message with the body "unsubscribe" as spam and not even show it?

I have had a paypal account for a while but never used it. The big thing about paypal for me is their terms of service agreement. All 18 of them. Take a look for yourself. Print them all out and read them.

Notice they are all apparently revised, and probably can be revised further as paypal sees fit. For Canadians at least, there is in my opinion a better way.

We have Certapay which lets you send money to anyone in Canada with an email address. When you receive my email there is no charge, but when you send the bank applies a charge. My bank charges $1.50 to send any amount. Not too bad, the money is transferred instantly and its all done on the same webpage as all my other internet banking. The transactions are done between the banks and not between the people exchanging money so in some ways its more secure I would think, or as secure as these things can be.

I stopped using realplayer so me time ago, I recall in windows absolutely hating how during the install, you asked them not to run at start up and not to put anything in the task-bar, but of course they ignored this. Maybe that has changed but I still hate their software. Sometimes however there is content on the web I want to watch but it is in .rm format.
mplayer -dumpstream http://some/realplayer/crap.rm 
will make a file called stream.dump which you can then watch with mplayer. You will need to get the w32codecs from the mplayer site. You can also convert .rm files into wav format or mp3's with mplayer and lame.

Posted by æc♥ | Permanent Link

April 19

seducing women



Sarah had one of her colleauges send her an ebook called Double your Dating. Essentially a guide for men to date women. So she sends it to me and I skim through it at work. Its pretty funny actually. Some choice exerpts:
The Six Things That Attract Women I've done a lot of research on this topic, and I believe that women are most attracted to these six thing:
  • 1) Means (Wealth, possessions, gifts to them or providing for them)
  • 2) Power (Influence, Leadership, provide safety)
  • 3) Fame
  • 4) Looks (Including height)
  • 5) Exclusivity (Royalty, already married, hard to get, affiliation)
  • 6) Personality (Humor, creativity, romance, intelligence, mystique etc.)
  • 1) guilty
  • 2) guilty
  • 3) guilty, and not just any fame, you gotta have big time fame, like Ben Affleck, or Carrot Top
  • 4) guilty
  • 5) guilty
  • 6) No way, I hate that, I just want a rich guy who will tell me what to do
I'd like to talk about some of the different personality traits that women find most attractive. Some are better when used with others, and some don't work well together. Here is the list with brief descriptions. I'll talk more about combining after.

Educated. Education is attractive to women as long as it's used in an interesting way. Some women are actually intimidated by education, as they're not educated (This usually works in your favor).

Dominant. Women have an unconscious attraction to dominant men. The dominant males in some primate groups account for up to 75% of all the matings, while the less dominant males go without. Same goes for humans.
Oh yes, theres nothing like a take-charge kinda guy who knows how to exploit my lack of education.
Well, for the record, I have no idea. After 30 years of studying people, Freud said that there was one question that he didn't have the answer to: "What do women want?" Nice. BUT, here's my take on it: First and foremost, they want a man that is in CONTROL (Of the situation, himself, his emotions, other people, control of the entire reality that they share)
But wait.. there's more
If you want to have sex with a woman, you could say "Hey, why don't we have sex?" Go ahead and try that one sometime and let me know how it works for you. Or, you could try this... Next time you're alone with a new woman, stand up, take their hand, and pull them up to their feet. Then give them a hug, let go, and sit back down. After she sits again, say "I just wanted to hug you." Then, later hug her again and cuddle with her. While cuddling, smell her neck and tell her how good she smells... and don't stop. Within a few minutes she'll be telling you how hot she's getting.
eek! I think you'd have better luck with the former than the latter.
The way I look at it, women are constantly testing men. They do this by acting bratty, making demands, complaining, commanding, being emotional, etc. Know what I'm talking about? Here's what I do: When a woman tries to test me, for instance she says "I don't like that heavy metal that you were listening to" I turn it up a notch and send it back to her... so I might say "Well, then you might want to not get in my car anymore, because it's all I'm going to play now that you're whining about it." (Said in a half serious tone so she can't tell if I'm kidding) This sends the message that if she tries to act controlling, I'm going to just turn whatever she's being a pain about up one notch and give it to her again. Women get the message loud and clear when you do this.
Bam!! I love it when you "turn it up a notch" like that!

Posted by æc♥ | Permanent Link

April 18

crime fighter

Last night my boyfriend had called me after he had gotten off work, about 3:30 so around 4:00-4:30 I wasn't quite back to my deep sleep and heard some noises in the parking area behind our building. We have a locked underground parking area for the tenants but the shops and bars underneath us use an alley behind our building for parking.

The noises sounded like guys working on cars, I could hear them talking and there was loud bangs and tool noises. I suspected they might be breaking into a car so I got up and tried to see them outside the window. I was about to call the cops but wanted to make sure, so I got dressed, intending to go down and peek around the corner, I figured I would jam our building door with a book, so I could run back inside quickly and not use a key if they saw me. By the time I got ready though, I heard a car start up, and running to the window I saw them leaving in a black pickup truck. I couldn't get the license plate from my viewpoint though.

I then tried to wake Sarah up to tell her, but she is one of those people that will sleep through anything. If it is on your insurance policy, she will sleep trough it, fire, theft, flood, locusts....

So then I called the cops, and they came within 5 minutes as we live right downtown. A girl in our building had a beautiful 2004 Acura and they had stolen all four wheels, left it on blocks of wood, and all the seats and stereo. I told the cops what I had seen and the description of the truck.

I then had to give formal statement and all that stuff. Around lunchtime they called and said they had captured the guys involved. In Toronto they have identified a number of the worst intersections for accidents, and because so many people were dying in car accidents at these specific locations they installed cameras.

Our thieves had driven through one of these intersections and because the police knew the type of vehicle, were able to trace the licence plate and apprehend them. So I'm happy they got caught.

My brother, whom I also called while this was going on was less than thrilled and yelled at me a bit for even thinking about going down to the parking lot to look. He told me to call the police first then call him the moment something suspicious is going on outside.

I'm just glad the girl will get her stuff back.


Posted by æc♥ | Permanent Link

April 15

xfce themes

I have used the Nvidia driver for as long as I can remember in Debian. I never really got the hang of the "Debian" way and these drivers, once I learnt how to ready the kernel source tree, have always built for me without a problem. What I didn't know was that there is a graphical configuration tool called nvidia-settings, just run that from the command line. I have seen this on Windows XP but didn't know it even existed for linux.

For you xfce4 users, there is now a theme site similar to the gnome-look and kde-look sites that have become quite popular. xfce-look.org will now be the place to get all of your themes and prettiness. There is also a developers blog if you want to keep track of what they are currently working on.

I have found a way around Sarah's mission for downloading every episode of CSI ever made. We were in the video store the other day and noticed they had all the previous seasons on dvd. So, promising her I would be able to rip the dvd's to .avi files, we rented season one, which is about 6 dvds.

I have downloaded and installed dvd::rip and it will grab most of the dependencies like transcode along with it. Following this awesome guide I managed to rip and encode Oceans12, which we also rented, to a massive avi file :-)

I think this is useful for movies I don't have time to watch at a given moment and I can now rip them, and watch the move later on my big movie friendly LCD. Keeping the movie for watching later is appealing but I can see disc space being a huge issue. Even with 2GB of ram, on a P4 3.0 computer ripping a movie takes a long time. Maybe because my settings are all on maximum quality, I didn't change too much from what the program defaulted to partly because I don't really know what these changes do.

Posted by æc♥ | Permanent Link

April 13

rdiff-backup

I have spent some time setting up some backups of my server, desktop and laptops. Up until now I had used a rsync with the --delete to simply mirror the files onto another computer but when a disc developed bad sectors it mirrored these and wrote garbage onto my backups, I lost hundreds of photos that time and am determined not to let that happen again.

rdiff-backup wasn't too hard to set up and I turned my Windows XP computer into a Debian sid file server for this job. I made it dual boot, windows is now on a tiny partition in case I need it for god knows what.

I did a couple of test runs, and got the hang of the right commands to use, but was unable to run the commands from cron in a script, I could run the command directly in cron...
32 13 * * * /usr/bin/rdiff-backup /home/..... 
like that, but not put that command in a script and run it. Yes, I checked all the environment values, yes I used sh and not bash, yes I used some echo's and redirected errors but still no love so I left it just running from cron. I will know tonight at 3:00am If it works, and at 4:00 am if the desktop works.

So at that point things were set up good, my desktop and both laptops had already done a test backup over the network with no problem. Last thing was to configure my web server for backup, but alas, as it runs woody, the version of python used wont work syncing to a server with a newer version, so this meant wait for Sarge to be released and backup manually or scrap all that I'd done so far and choose some other software, read up on its documentation and set it all up, which wasn't appealing either, so it was suggested to me to use NFS, which is what I have done. My backup server now exports a 50GB partition to the rest of the computers and rdiff-backup writes to that as if it was local.

There was a pretty big snag though that I hadn't thought of, and that is the UID of the users on all my computers, my main usename is usually UID 1000 as it is the first user added to the system. However on the backup server it wasn't and and I ended up with a username having the gid of another user, it took some time to fix that but it looks ok so far, and I showed unusual restraint and patience fixing it, the old me would have waded right in with
chown -R user:user 
all over the filesystem.

Anyway, I took notes and wont have these problems next time, I hope.

One thing I noticed was Debian has very brief NFS coverage in the Debian Reference and I suppose maybe its because its not particularly difficult to set up but nevertheless, its not like no one uses it or is there a new better way now?

I looked for a debian wiki, or debian specific howto's but ended up actually using the Ubuntu wiki as a guide.

Posted by æc♥ | Permanent Link

April 11

rcconf

I heave learned of a nice little frontend to update-rc.d called rcconf. It is a simple way to disable and enable service when you boot up.



Ok, you might say what is so hard about: update-rc.d apache remove? Well sometimes you might not remeber the name of the service, apache could also be called www or httpd (ok apache is a bad example but you know what I mean).

Heres a nice little mutt tip. (at least I think so) Often I want to jump around between my mailbox's and adding this code to ~/.muttrc will let you hit the left arrow, anytime, to show the folder list.
#single key to go from index to mailboxes browser and back
bind pager   <Left>  exit
bind generic <Left>  exit
macro index  <Left> "<change-folder>?<toggle-mailboxes>"
Oh and for video fans, here are 622 music videos.....

Posted by æc♥ | Permanent Link

April 10

hotdog water

It looks like I am wasting my time learning to code. The nice folks over at MIT have come up with a way to write software without knowing how to code.
Writing software has been relatively difficult since people began programming computers in the mid-1900s. Although programming a computer is eminently useful -- it gives you fine control of a powerful tool -- it requires learning a programming language.

Researchers from the Massachusetts Institute of Technology are aiming to remove this requirement. They have taken a step toward that goal with a language-to-code visualizer dubbed Metafor.
And to think, all the hours I have wasted so far learning... :-)

Here you can see a little movie of it in action. Its pretty cool and who knows?, one day anyone can write their own software in any language with no prior programming knowledge.

Of course the logical next step after that is being able to do 3D rendering without the fuss of learning all those complicated and difficult to learn render applications.

Don't worry, that problem also has been solved for you. Written in Lisp, WorldsEye can create 3D scenes from textual descriptions.
WordsEye allows untrained users to spontaneously and interactively create 3D scenes by simply describing them. By using natural language, ordinary users can quickly create 3D scenes without having to learn special software, acquire artistic skills, or even touch a desktop window-oriented interface.
I was at my boyfriends apartment with Sarah and her ex, and on the stove there was a saucepan with stinky 2 day old water with which my boyfriend had used to boil up some hotdogs. You know the cheap supermarket, mechanically deboned, bologna infused hot dog that kids go crazy for. I remember eating tons of them as a child.

Anyway, Sarah's ex decided he wanted some hotdogs. Keep in mind he is a Head Chef at at a really fancy Italian restraunt. He takes two hotdogs out of the fridge and puts them into the pan with the same two day old water that my boyfriend had used to cook his with. I almost puked just looking at it. I mean the sink is right next to the stove. Even if your too lazy to wash the pan, is it that much trouble to change the water? He told me "it's all about the flavour, you wouldn't understand".

Ewww.


Posted by æc♥ | Permanent Link

April 08

ubuntu

I watched a couple of movies this week, I, Robot which had good special effects but I thought was so-so otherwise.

Collateral was a little bit better and I thought because two actors that I absolutely love were in it, it would be really good. I am not talking about Jamie Foxx and Tom Cruise but rather Mark Ruffalo and Jason Stratham

Mark didn't disappoint and was great throughout the film but Jason was in the opening airport scene and that's it! I thought for an actor as established as he was, a little cameo like that didn't do him justice. If you haven't seen the movie stop reading, but basically.... Tom Cruise the hitman arrives at LAX to do his job, Jason meets him to give him the tools he needs, guns and names and address's etc etc.

Tom walks through the airport concourse carrying a leather case, Jason walks toward him carrying an identical case. They do the old "bump into each other and excuse each other and pick up the other guys leather bag" swticheroo.

That's about a 2 minute scene and the end of Jason in the film. Kind of a let down. Not to mention, do criminals really do this now? I mean are there places with less cameras, security guards and German Shepard dogs than airports that would make more sense to safely exchange your tools of the trade?

Because I am glued to my big new monitor now, I use the laptop less and less, but you cant beat it for waking up Saturday morning and staying in bed with a cup of tea and a bagel checking your email and reading the news.

The latest ubuntu release contains some laptop features I've not seen in a stock Debian install so I decided to give it a whirl. I will also try the new Debian installer version 3 this weekend if time permits.

The ubuntu installer is pretty good, not much different the the debian one that I could tell, I choose "expert" but wound up with a gnome desktop, I assume this is intended, but wonder what you do if you don't want gnome.

I did like the partitioning option that lets you choose inode sizes, so if you have a partition called /movies for example you can select the "large file" option and it will adjust the inode size accordingly. I don't remember seeing this in the version 2 debian installer but will look for it when I try version 3.

The kernel choices were a little odd, 2 choices were named kernel-image-386 or something similar, but did not tell me the exact kernel version it would install, the 3rd choice, kernel-image-2.6.10 was a little more clear and that's what I went with.

Other than that I had no problems at all. It got sound, and video resolution correct without any problems. I wont do the nvidia driver as I will be installing Debian rc3 on the same laptop soon for comparison.

Big bonus for recognizing and configuring my prism54 wireless NetGear pcmcia card during the install.

The only gripe I have with the ubuntu desktop is the ugly color and wallpaper that comes with the default install and that sound events were enabled by default for everything.

Maybe I am used to not having little bells and chimes when I open windows, but I thought that was a Microsoft thing that KDE adopted and now either gnome or ubuntu have decided to run with too. Not a big deal though, that can be off and I can find nicer themes and colors on the web.

I will try the suspend to ram and hibernate stuff as soon as I know how to do it. There are no menu items that specifically show me how this works so I assume its a command line tool?

Posted by æc♥ | Permanent Link

April 06

new blog

Now nanoblogger is in Debian unstable I took the time to convert my archives to the newest format and upgrade the blog. I decided to lose alot of the stuff from my old blog, especially things that require outside sites.

The comments, and the freshmeat scraper, and the "currently reading" applet are now gone. I if you need to comment you can email me and If you want to know what I am reading, just ask :-)

The problem was waiting, if one of the external sites would not load it would then proceed to hold up loading of the rest of the page and this is too annoying.

If you have an rss feed, you will need to change the address as my software is now making rss2 feeds instead of rss1. The new feed can be found here.

I also changed the header a little but did not deviate much from the standard nanoblogger layout, I guess this blog's appearance is not on my high priority list anymore :-)

Brian told me about streamtuner which lets me tune into shoutcast streams (among others) and then with streamripper I can even rip them to mp3's as I listen. Pretty cool, it has some internet radio but not as much as I had hoped.

I might take another look at rhythmbox as it can do internet radio as well as sort and play your own music collection, but not sure if it can do streaming audio too.

I have decided to go paranoid with my server, and set up a bunch of iptable rules that basically drop any packets that are not in the "allowed user" groups.

SSH has to listen on a port for connections, the bruteforce password guessing bots are annoying and you never know, one day one of them might get it right. Hiding the port ssh listens on would only thwart the stupidest of crackers.

I decided that because I know the ip address of all people who connect to me, I can white-list them and drop any packets from unknown ip's. So far this is working out fine but I haven't gotten the web server back online yet, so if you are getting a timeout, that is the reason.

Posted by æc♥ | Permanent Link

April 04

evince

Acroread, as I mentioned last week renders beautiful pages and does pretty much all you'd want a pdf reader to do. However stargirl pasted this link in irc describing how Adobe Reader 7 spies on its users.
The newly released Adobe Reader 7 again allows authors of PDF documents to embed an arbitrary web address which is then informed whenever you open the document. This use of "web-bugs" is the same functionality used by spammers to track and verify use of your email address and is done without informing the user and without consent.
It turns out this is not a big secret however it also is not a feature that the user is made aware of upon installing Acrobat and I see no way to either turn it off, or to let me know what information my pdf reader is sending.

This brings me back to evince. I had concerns about it not scrolling continuously but it looks like this issue has been addressed and I will happily drop adobe in favour of evince once I can scroll, scroll and scroll some more.

æc♥


Posted by æc♥ | Permanent Link

April 01

sshd

I noticed that sshd had been restarted at 6:25am this morning and thought this was a little bit odd. The good folks in #debian also agreed, said to back it all up, reinstall and then dig through the backups for a clue as to what happened. I got a friend to shh in and he told me its not a problem, my config specifies Privileged Separation and a lost terminal or some such can cause sshd to restart. I still don't understand it totally but he took a lot of trouble to dig through the logs and made sure everything was as it should be.

I have chkrootkit installed and installed lockcheck today which emails me if any weird or unusual things are going on.

This code in ~/.emacs will open the bookmark file in a buffer every time you start it and set F8 as a quick key to recall them. Thanks Sean for that one.
;; list-bookmarks, open the bookmark list every time
(global-set-key [(f8)] 'list-bookmarks)
(add-hook 'window-setup-hook 'list-bookmarks)
(switch-to-buffer "*Bookmark List*")


I am happy to say also that UTF-8 works now on my server, so irc,screen and irssi are all utf-8 enabled, I still cant get the Canadian English utf-8 locale but perhaps when Sarge releases It will be there. Oh and I sooooooo want this t-shirt!......

I am halfway through the exercises with bit operators and cant wait to be done with them, the next chapter is the preprocessor and that looks at first glance to be little less tedious, but you never know it might suck too :) Linuxchix has started a course on Perl and it so tempting to pick through that on the side but its the type of thing that would demand more time and attention for me than I can give at the moment. The C course they have is also on my Todo list and I am dying to to do Akk's Gimp course to... I keep telling myself "you have all the time in the world.." but it amazes me how people can learn so many computer languages, I know they all share common features and people tell me the next one will come easier but still, it boggles my little mind.

æc♥

Posted by æc♥ | Permanent Link