Wednesday, March 14, 2007

at home

made it back home last Friday. i'm using a sucky internet link that varied anywhere between 0.6 and 4.7 kpbs in the last 35 minutes, and since there's no power (i live in lagos, and there are some power problems there), i'm running both the modem and my laptop off the laptop battery, meaning i have to pack this in soon (if the heat doesn't get me first).

i recently installed Apache on my laptop, and everytime it runs, the CPU usage goes up to almost 100%, meaning that my laptop battery doesn't charge when i'm running Apache. it also means that my computer instantly becomes much slower. i'm not sure if it's the antivirus program i use, Comodo antivirus, since i've used it without that antivirus installed, and it doesn't do the same thing...but disabling the antivirus and running the server didn't help...

if you're close to a student of my school, you probably know that after students were vacated (rather) forcibly from school, a part of the Sports Market burnt down. so quick resumption seems to be a dream of the things they pump oil through. ah well

got to pack this in, so later!

Thursday, March 01, 2007

The OAU Standoff: Day 4

you might have heard that my school has been closed indefinitely. but since i haven't blogged in a little over a week, you never heard of it (at least from me). anyhow, from what i've pieced together, here's the story.

school traditionally has a week free of lectures and similar academic activities right before exams begin. as far as i can tell, this isn't a part of the school's constitution, merely a concession on the part of the school's senate (highest academic authority in school). however, this "privilege" (i'm assuming my information is correct) has been often abused in the sense that the SUG has turned into a right to be demanded for whenever it seems threatened. unfortunately, while the former VC, Prof. R. Makanjuola was the kind of person to allow such and still leave the week open, the current VC, Prof. M. Faborode, is not.

my story does not actually start here, but i'll pick a certain point in past history as its starting point. last session, the SUG elections held as usual, and allegedly rigged so that a certain candidate, Akinola Saburi was declared President. his legitmacy was initially questioned, but later things were laid to rest. soon after, though, the school authority declared Saburi's election was invalid, because he was on suspension by a previous administration. Saburi was later expelled by the current administration. this obviously led to a strained relationship between the authority and the SUG, to the point that i heard that concerning the current deadlock, no meetings actually held between the school and the SUG because the SUG allegedly held the stand that if Saburi was not recognised by the authorities, the other members were not going to meet with the school.

exams were to start on Monday the 26th, this was brought to an end rapidly by the SUG when they invaded exam halls and stopped exams from taking place. i'm not quite sure when the authorities hired MOPOLs exactly, but i think it was the same day. history lets us know that students and armed law enforcement are a volatile and explosive mix, one that should not be allowed occur. i have no idea what the authorities were thinking, since the MOPOLs are not examiners/invigilators. that said, the SUG had already set up blockades so that vehicles were not allowed to move freely in and out of campus; it was mostly irrelevant since the largest volume of campus traffic is public transportation. it also seems the banks on campus were "visited" by students and even the ATMs weren't working, if i remember correctly. by Tuesday, incidents involving students, stones, MOPOLs and tear gas took place. in an ironic twist, some students reading in academic areas on Tuesday night were assaulted by other students, who maintained that reading was to be restricted to halls of residence.

yesterday started with Saburi going around informing students to stay in their rooms if they were cowards, and that "traitors" would be treated like Judas Iscariot of the Bible. the MOPOLs, unlike the previous days, did not patrol campus, just stayed at the gate. i heard the SUG gave the school the ultimatum that if exams were not delayed by a week, the school should be closed. and it was. students were told to vacate the halls of residence by 6pm yesterday for their own good. what makes this situation particularly aggravating is that new graduates are in school to receive call-up letters for youth service, so this situation affects them too. so now i'm in school and thinking of what to eat, and how to start reading so i can be ready for exams whenever school opens. later, anyway!

Wednesday, February 21, 2007

Someone help! Google Sketchup driving me up the wall!

Google Sketchup seems to be the new darling of many 3D peeps out there. and as i've found, it is a really cool program. my only problem with it is using it - because, as you may know, i am not online 24/7, and i'd much prefer to be able to download the manual. unfortunately, the manual download link is not resumable, making sure the peeps like me that have psychotic internet connections are basically messed up, since all we can do is try to download the manual. mirroring the HTML using HTTrack didn't work. and having the manual would save me sooo much trouble using Sketchup. someone tell Google to allow resumes for the manual at least. later!

Tuesday, February 20, 2007

hey up!

so i went home over the weekend to attend a friend's wedding, and to give my dad his birthday present in advance. or so i said. when i got to Lagos, i dropped off a package for a friend at Computer Village, Ikeja, and purchased a few DVDs. i was going to my dad's office when i got picked up (or should i say picked on) by a policeman in plains. to cut the story, i was picked up for carrying around a laptop, and the man was just looking for prey, because even after i provided a receipt for it, he went as far as making me call the number on the receipt and asking them to fax something having to do with where and how they get laptops. for crying out loud, what's that got to do with me? at the last, i called my dad, who called my uncle - who in turn got there with an uncle of mine who is himself a policeman. so i got out without paying a dime to anyone, and i'm really grateful for that, since i barely made it back to school, even with a raise from my brother!

that said, there's a variant of the RavMonE.exe worm that isn't picked up by AVG Free Antivirus/Antispyware. quite odd, i must say, since generally Grisoft's security products are actually quite good. the file is not much under 4MB, same executable name, and is also coded in Python.

Sunday, February 11, 2007

something i've begun wishing for

i've recently begun to make some use of Inkscape, and more and more, i wish that i could (more like someone could) write a script/plugin to create a palette of colours used and then allow you to change the palette on the fly, modifying the document. in essence, a bit like CSS for Inkscape. this way, i could create "colour themes" for graphics so that i could quickly see the new colour theme's effect. this would definitely be far more handy than trying to hand-edit that complex gradient. i wanted it for myself, then a client says, "change the colours", and i know i'm in trouble. i don't even want to think about how troublesome that would be...

Wednesday, February 07, 2007

a rose by any other name...

William Shakespeare, genius that he was, penned the immortal lines. quite unfortunately, the converse also holds: a nettle by any other name is still going to sting just as well. this is the weird beginning to todays post on the many wonders of developing on Windows, specifically DLL hell - or at least a problem much like it.

for the uninformed, DLL hell comes about from the process of installing and uninstalling programs, usually resulting in an important shared library (DLL) being replaced with a version that causes other programs to fail. see this Wikipedia article for more information.

my problem isn't quite DLL hell, but it is related somehow. now, for unmanaged C++ (that is, C++ native code, or code not managed by the .NET Framework, hence the name), you'll most likely require some sort of runtime, as defined by your compiler vendor/settings. with Visual C++ 6.0, you needed msvcrt60.dll and msvcp60.dll for the runtime of non-debug C and C++ runtimes respectively, and for Visual C++ 8.0 (including VC++ 2005 Express, which i use), you have msvcrt80.dll and msvcp80.dll - or something like that. where DLL hell comes in is that if you have the required DLLs for a program to run installed, some program may replace/remove such when you install/uninstall it, breaking other programs needing it. in my case, i've been writing code that had a dependency on msvcp80.dll, and didn't have a problem until i uninstalled something. suddenly previously perfectly working programs i wrote stopped doing so. now Microsoft has these redistributable packages that allow you run programs with that particular runtime dependency. so i got a copy of the Visual C++ 2005 Redistributable package (download page here) and installed it. twice (two different copies, that is). no dice. i finally had to rebuild the application framework library (wxWidgets) so i could statically link in the C/C++ runtime for each application. ah well. i did at least know enough to get round my problem without reinstalling my compiler and its service pack. sayonara!

Saturday, February 03, 2007

Why i switched back to Firefox from SeaMonkey

as you probably already know, the Mozilla Corporation is the new home for Mozilla Firefox and Mozilla Thunderbird, and the original Mozilla suite is more-or-less gone, and is the base for the community project called SeaMonkey. SeaMonkey is really the successor to the Mozilla suite, containing the works - browser, HTML composer, email client, IRC client - with some other things to make the power user pretty happy.

anyhow, i started using SeaMonkey because of some things i'd heard about it: it consumes less resources than Firefox and Thunderbird separately, since with it, it's all the same one application; it has a quickstarter on Windows to allow it start up faster; the Firefox artwork is not open-source, as is the rest of Firefox, which is problematic for users wanting to bundle Firefox with opensourced (notably GPL-licensed software/operating systems. there's been some hullabaloo about it all.

so i installed SeaMonkey, started it up…was almost immediately disappointed. i had the following problems with it:

  • the simple keyboard shortcut for the search bar from Firefox was missing. combining the address and search bars is cool, but i'm just not used to it, and searching when trying to open an address is annoying.
  • the easy choice of search engines in Firefox (two clicks or keyboard buttons once you're in the search bar) is really cool. Google isn't the only useful search engine out there!
  • i can't and/or don't use some of the other features that come with SeaMonkey, such as email/IRC chat. the additional 7MB for the download isn't worth it.
  • address completion shortcuts are soooo missing in SeaMonkey.
  • as at when i use SeaMonkey, only the default themes seemed to be available for use. i love eye candy less than the next guy (i use the Windows classic theme, FYI), but i do appreciate it once in a while. in my opinion, the only SeaMonkey theme worth using is the Modern theme, and even that gets boring after some time.

basically, i've more easily got used to Firefox than SeaMonkey, and making the switch was (to my thinking) unnecessarily hard, since they both use the same codebase. SeaMonkey doesn't need to be a Firefox clone, but there are some really cool things in Firefox that can be adopted in SeaMonkey.

Thursday, February 01, 2007

randomness

some Microsoft bashers have far too much time and money: look here.

and what's with the new (seeming) jollity between Google and Yahoo!? i've noticed that if you run a Google search while logged in to Yahoo!, you see some additional options at the top of your pages...later!

wxWidgets and the Windows SDK

i recently formatted my harddisk and reinstalled Windows, so i started installing applications i normally use. that included VC++ Express, and since i develop applications using it for the Win32 platform, i would normally have installed the Platform SDK. however, i'd recently obtained the Windows SDK, so i used that in lieu of the PSDK. i mean, the WinSDK seems to be the successor to the PSDK, so why use older headers and libs…or so i thought. everything went smooth, and i even integrated the WinSDK with VC++ with a single click (configuring VC++ itself for native Win32 apps was a little more roundabout; see this article for help). so far, so good.

since i was using wxWidgets for an application i was writing before the format, i downloaded it again and started the commandline build, according to the time-honoured instructions in the source archive. i started the build and almost immediately got shock #1: wxWidgets (or specifically, the TIFF library bundled with it) wouldn't build because windows.h was missing. as i'd integrated with VC++, i was surprised, to say the least. i checked the VC++ directory options and found nothing wrong, and windows.h was supposed to be available. checking the INCLUDE environment variable let me know that the WinSDK hadn't set environment variables when installing. after fixing it, i sat back to enjoy my build procedure until i got shock #2: some platform-specific code wasn't building. since i'd already built that version of wxWidgets before without problems, i had to surmise that it was the WinSDK acting up. installing the PSDK and removing the environment variable settings i created for the WinSDK allowed wxWidgets to build without fuss.

i'm not sure if it's the wxWidgets team or Microsoft i should blame, but since Microsoft is the company everyone loves to hate (actually, because the PSDK worked all ways), i'll say Microsoft wasn't on the up-n-up, or why would they change the API so it would break existing code? whatever, anyway. the main point is that wxWidgets 2.8 (and most likely, lower versions) doesn't work unpatched with the WinSDK, as maybe a few people would have found out by now. so version number addict, chill out. today's Win32 apps should still work on Windows Vista, so it's not that big a problem anyway. later.

Saturday, January 27, 2007

wxWidgets 2.8 not working with Windows SDK

i recently formatted my harddisk and reinstalled Windows, so i started installing applications i normally use. that included VC++ Express, and since i develop applications using it for the Win32 platform, i would normally have installed the Platform SDK. however, i'd recently obtained the Windows SDK, so i used that in lieu of the PSDK. i mean, the WinSDK seems to be the successor to the PSDK, so why use older headers and libs? or so i thought. everything went smooth, and i even integrated the WinSDK with VC++ with a single click (configuring VC++ itself for native Win32 apps was a little more roundabout; see this [link]article[/link] for help). so far, so good.

since i was using wxWidgets for an application i was writing before the format, i downloaded it again and started the commandline build, according to the time-honoured instructions in the source archive. i started the build and almost immediately got shock #1: wxWidgets (or specfically, the TIFF library bundled with it) wouldn't build because windows.h was missing. as i'd integrated with VC++, i was surprised, to say the least. i checked the VC++ directory options and found nothing wrong, and windows.h was supposed to be available. checking the INLCUDE environment variable let me know that the WinSDK hadn't set environment variables when installing. after fixing it, i sat back to enjoy my build procdure until i got shock #2: some platform-specific code wasn't building. since i'd already built that version of wxWidgets before without problems, i had to surmise that it was the WinSDK acting up. installing the PSDK and removing the environment variable settings i created for the WinSDK allowed wxWidgets to build without fuss.

i'm not sure if it's the wxWidgets team or Microsoft i should blame, but since Microsoft is the company everyone loves to hate (in this case, more because the PSDK worked previously), i'll say Microsoft wasn't on the up-n-up, or why would they change the API so it would break existing code? whatever, anyway. the main point is that wxWidgets 2.8 (and most likely lower versions) doesn't work unpatched with the WinSDK, as maybe a few people would have found out by now. so version number addict, chill out. today's Win32 apps should still work on Windows Vista, so it's not that big a problem anyway. later.

Wednesday, January 24, 2007

internet annoyances

here in school, the cafe i use is served by the school. recently the school's servers have been messing up. i've been in the situation of a site's favicon being retrieved, and a DNS error page. obviously, the site's domain name was resolved, or was it via magic the favicon showed up? i hadn't bookmarked it anywhere! even Google and Microsoft aren't left out. i'm not sure which is more ridiculous - the former scenario or the one where i can visit the main Microsoft site but i can't download anything from its subdomains. eek!

Sunday, January 21, 2007

when software does what it should

…but that isn't what you want it to do, what do you call that? i downloaded BO2K, but my antivirus program, AVG Free 7.5, which runs automated scans every day at 8am by default (quite useful, actually) always picks it up. now that's what it's supposed to do, but that not what i want it to do. i'd rather it left the BO2K alone. i was going to use it for remote admin, until i remembered UltraVNC. still, BO2K has features such as remote process listing and whatnot, and i really would like that, rather than just have access to the remote machine's desktop and filesystem. ah, well. you can't win them all, can you?

love...why does it seem so hard?

i read an instant message between a guy and a girl, and my heart went out to the girl. here the guy was, trying to milk money out of her, and she just wanted someone to make her feel special. no, i'm not absolving her of blame, but i can understand. because i'm human. because i've felt it too. the ache. times i have passed a couple and i wish i were him. we're created to feel wanted by someone of the opposite sex. it's natural.

the problem occurs when we let the desire for relevance run uncontrolled. there are so many women who would rather not have sex, but to satisfy the man in their life, they submit themselves unwillingly to sex - psychological rape, i call it. many men empty their bank accounts just to make a woman happy. there are so many stories of people who take things from their loved ones that they wouldn't take from anyone else…people losing respect, people selling their values for a fleeting satisfaction. and it makes me sad.

i'm not immune. i put up a brave front, saying things like, "women are irritating", or "women are troublesome", or the latest: "when most women run their configuration wizards, they seem to almost always check the 'Be Troublesome' checkbox". but like everyone else, i just want to love someone and be loved by them. sometimes i just want someone to hug me and the feeling can sometimes be so intense, it scares me. and that's one problem with many people: they are scared about the depth of longing for relevance. it won't be satisfied with one or many flings. there's a deep-seated cry in each of us to love and be loved. the writer of the book of Ecclesiastes in the Bible put it well when he said that God had "…put eternity in the hearts of men."

if God put it there, then nothing in this world will ever satisfy that longing. i know. i got so mixed up that at one time in my life i had a list of almost ten women i had different levels of non-negligible attraction to. d-uh! i can't be with all of them, can i? so i stayed away, using my mind and wit as both a shield and a weapon of offense. but i tired of it. i wounded people i cared for, simply because i couldn't handle it. it hasn't stopped in a sense, but i have changed in one simple way: instead of trying to give myself excuses for not being in a romantic relationship and trying to explain away the attraction i felt for someone, i faced it. i began to believe that i am a desirable and attractive young man (i still need to learn the secret arts of cosmetics usage), and that even though i was attracted to people, i didn't have to excuse it away - or do anything about it. yes, i'm self-conscious around such people, but that's about it.
more importantly, i'm beginning to look more to my relationship with God and to myself for my sense of importance. i'm putting a value on myself. i don't need anyone to make me whole but God. and He's not doing a lousy job of it - that much i can tell you. i'm not saying my insecure days are over…but i can look at myself in the mirror and thank God for the day He created me - someone else is going to, someday very soon do the very same thing! and ladies, hands off - this dude is expensive stuff! it took a human life to buy me - so nothing less will do for the rental value! sayonara!

Saturday, January 20, 2007

Consolas font from Microsoft

i've been programming for a little while with Microsoft Visual C++ 2005 Express, but i never had so much fun reading/writing code as two days ago when i changed the editor font to Consolas. Consolas is one of a number of new fonts developed specifically with Windows Vista in mind, but Microsoft in its not-so-recently-hatched generosity is giving it away for free for developers (obviously, pretty much anyone can get at least Consolas, not to mention that the fonts also came with both the beta and release versions of Office 2007). for a monospaced font, it's really more legible than Courier. i guess if you use a version of Visual Studio the setup file would automatically set Consolas as the editor font, but it seems not to work with the Express Editions. typical, i forgot all about the installed font the next time i ran Visual C++, but something got me looking in the options (something i rarely do normally) and i set the editor font (i generally don't do this either. the closest i've come to doing it is changing the display font for SciTE from monospaced).

by now i guess i probably got you at least a mite interested, so let me stop advertising Microsoft and just give you the link to the download.

Friday, January 19, 2007

coding among thorns...

i've been developing a small app that required an embedded database. i'd used SQLite with a degree of success, but i wanted a change, especially when someone said something about the files getting easily corrupted. my next choice was embedded Firebird. since i was writing a C++ application, i decided to use the default C++ API for Firebird, IBPP.

developing this app has been a great learning experience. for instance, i found out that using std::vector as a container calls the copy constructor for stored objects. there's a class in my code that has a private copy constructor, mainly to prevent me from trying to make copies of existing objects (if each object is to be completely unique, there'd be a need for that, wouldn't there?). i wasn't sure about it, so i stored pointers to objects of that class in the std::vector. later, i duplicated the code relating to the vector and tried using actual objects. my compiler (Visual C++ 2005 Express) gave me a major error in the vector include header, of all places! heh!

my app i going along fine, and i hope to be done with it by Saturday. on the subject, Sleepcat Software was bought by Oracle. interestingly, i just found out this morning while googling for embedded databases, even though the announcement is dated February last year.

saa te, later!

Wednesday, January 17, 2007

wisdom...on much more than 3d

i've known about SomeArtist's blog on 3d modeling for some time now, but i really didn't look up his posts. he has quite a bit to talk about, but even if you're not a 3D modeler, i suggest you look up his site. his tips are applicable to more than just 3D, because he talks about thinking, not modeling per se.

so go on, have a look see.

Tuesday, January 09, 2007

woes...gone?

so, here i am, back to coding in the middle of the night (it's past 2am here). i found that compiling IBPP and linking the created object into my application only worked until i made a function call, namely to create an IBPP::Database object. then all hell broke loose. so, i did the recommended thing and added all the IBPP source files to my project, and recompiled after removing all references to my custom "library". recompiling gave me the (expected) error of complaining about wide (Unicode) characters not being compatible with regular ones. since i only got about 9 or so errors, i started editing the source file (_ibpp.cpp), and converting most references to quoted strings that gave errors to Unicode-compliant strings using the TEXT() macro. the final challenge was a call to std::string::c_str(), so after trying to create my own function to convert from ANSI to Unicode, and failing - i solved that with a cast. i'm not so sure i won't trip up in future, but i'm feeling more confident now - considering the "solution" took less than 15 minutes, and i'd been battling with the problem for over an hour. i could do with some sleep, myself. later!

Monday, January 08, 2007

Update in progress

went to classes for the first time this year. heh. nothing much happening. went over to the wxWidgets forums to gripe about my wxWidgets application linker problem. apparently, i didn't remember signing up, but i had, previously. when i logged in, i decided to look for the problem i was having before griping, and lo and behold, it seems i was using a different configuration (probably trying to build a debug application on the release version of wxWidgets i had, though i'm almost certain i always switched it...). at any rate, it seems the problem was a very common one indeed, judging by the number of people who posted separate threads for it. anyhow, i'm quite glad i'm not alone in this thingy. anyway, i always solved the problem by creating a new project, so i'm not too bothered.

this is totally unrelated, but there's going to be a live Transformers movie! and guess what? Steven Spielberg is the exec producer, with Michael Bay as director! i saw the Japan-only trailer on YouTube. arigato gozaimasu, Spielberg-san, Bay-san! later, then.

Sunday, January 07, 2007

Growing pains

yo. been quite a while, relatively. been trying to code and not being very successful at it. i don't know what happened to me. anyway, i was having problems with some stuff i was doing. compiled FOX, but since it didn't contain the code for some external libraries such as Zlib, i followed the instructions on the site and defined some macros to include them in the build. the library built fine, but the example programs gave me linker errors no end, complaining about multiply defined symbols. had to get rid of the entire library

something similar happened when i actually started working on a project using wxWidgets and IBPP. for some reason, IBPP doesn't support Unicode, or so it seems to me. i built the application (and wxWidgets) with Unicode support, and IBPP choked. the fix: build IBPP as a separate library. fortunately, even though the IBPP team recommends merely including the source into your own code, i built it (quite easily - just compile all_in_one.cpp), eliminating one problem. the other was fixed by including wxWidgets headers before IBPP's since they both declare a macro with the same identifier (_). the clincher came when i edited some code in my skeletal application, and got a wxWidgets linker error about not finding wxStringData::Free(). nowhere in the wxWidgets docs does this method exist, and not even in the library, it seems. pulling out all calls to IBPP didn't fix it - i had to plug the entire app.

i haven't coded in a long while, so maybe that it. and i don't even want to go into the problem of multiply defined symbols due to different runtime libraries. oh, i'm using Visual C++ 2005 Express Edition Service Pack 1. i really was about to give up. i kept thinking, it's the story of my life anyway. i'm not sure maybe it was due to lack of sleep, but i do feel better now, and i guess i'm ready to give it one more shot.

Monday, January 01, 2007

Happy new year!

yes, 2007 is here! and happy new year to you too! so, what are your plans for the year? don't tell me, just make them - and make sure you execute them. plans are no good unless you do something about them. despite that, however, remember that Robert Burns said something about the best laid plans of mice and men gone agly…or something like that. plans are only so good, and are limited to the planner - no human can see the future. that said, it's better to have a plan for the year than just fall through - the plans act as a measuring stick to determine just how successful you've been. well, guess i'll leave you to your planning and scheming for the year. later!