Monday, November 17, 2008

my weekend was an ass...wait, that's not right!

phew! what a weekend! Dad was out of town, so it was just my brother& i at home till last night. man, this was the illest weekend so far - as regards tiredness. i can't believe Friday & Saturday i was retiring before 10pm. dude, i really need some downtime - but i'm afraid that may not be till next month.

spent some time designing a website. unfortunately, it seems sticky-footer layouts are mutually exclusive with centered layouts. i can either allow the content pane be centered in browser window, or i can make the footer stick to the bottom of the browser window. so far, i haven't managed to let it do both.

i usually dislike the mass mail i sometimes get, but this one's got something in it so i'll reprduce it here:

One day a farmer's donkey fell down into a well. The animal cried piteously for hours as the farmer tried to figure out what to do. Finally, he decided the animal was old, and the well needed to be covered up anyway; it just wasn't worth it to retrieve the donkey. He invited all his neighbors to come over and help him. They all grabbed a shovel and began to shovel dirt into the well. At first, the donkey realized what was happening and cried horribly. Then, to everyone's amazement he quieted down. A few shovel loads later, the farmer finally looked down the well. He was astonished at what he saw. With each shovel of dirt that hit his back, the donkey was doing something amazing. He would shake it off and take a step up. As the farmer's neighbors continued to shovel dirt on top of the animal, he would shake it off and take a step up. Pretty soon, everyone was amazed as the donkey stepped up over the edge of the well and happily trotted off!

Moral

Life is going to shovel dirt on you, all kinds of dirt.The trick to getting out of the well is to shake it off and take a step up. Each of our troubles is a stepping stone. We can get out of the deepest wells just by not stopping, never giving up! Shake it off and take a step up.

see y'all some other time

Blogged with the Flock Browser

Thursday, November 13, 2008

Rhymin' on Facebook chat

was just wording with Legzitano on Facebook chat, and for some crazy reason, the conversation went like this:

Legzie: tryna stash cash
me: in a flash, smoking brown hash, flipping the ash
Legzie: brown hash is trash
cos you may crash
me: word bro...just tryna make that rhyme
Legzie: lol
me: maybe we should dash? grab some mash? what a bash!
Legzie: good, bro!
you sing like Nash
me: omo, battery don dey run down
Legzie: no vex!
ryhming no easy

i'm almost tempted to agree with the guy who said, "Of all the things i lost, it's my mind i miss the most". almost. but not quite.

Saturday, November 08, 2008

Animal Farm

yesterday i found out (courtesy of friends on Facebook) about an event that has quite a number of people abuzz: the assault of some civilians on Monday in Victoria Island by naval servicemen, including someone i knew a couple of years ago. in the aftermath, she - and some other person - is suing the Nigerian Navy to the tune of N100m. personally, i think this is both bad & good:

  • why would not moving quickly out of the way of a military higher-up be an 'offence'? i'm a citizen - he's a citizen. the fact that we both serve our country in different ways should make no difference. if anything, the fact that i pay taxes which help to fund the machinery that pays him should be accounted for. unfortunately, like Animal Farm, it's become a case of all being equal, but some more equal than others - whatever in the world that means.
  • why would an elderly man sit & watch his aides brutalize people with no show of what Shakespeare called 'the milk of human kindness'? i side with Elihu on this one (Job 32:7, the Bible) - whatever the offence, the level of beating & the treatment given her was overkill.
  • if the higher-up is in such a hurry, he should at least have found out that there's always traffic in V/I around that time, and scheduled his coming for some other time it was lighter
  • i believe his oath on taking a uniform had some variation of 'to protect and to serve'. how are the nation's best interests protected by forcing people to disobey traffic laws just because you have an inflated opinion of your own worth? 'now all i need to push people around is a uniform'. isn't that self-service at the cost of the nation's morals. it's no wonder so many people think a uniform is a shortcut to a plush life. is he - or any other egotistical military personnel - any different from people in public office who rob the nation blind? i definitely am not going to be saying to my kids: 'Rear-Admiral Arogundade? now that's someone worthy of emulation'. in my opinion, he's no different from any two-bit thug.
  • it's good that she sought out advice (bad or good) & decided to take civil action. it means that Nigerians are learning that they have rights that can be protected. i'm hoping that there will be some win for moderation and common sense...but the inmates are running the asylum.

i could go on, but let it suffice to say that things don't look too bright. i hope the support of Uzoma and the rest isn't just for show, that we are willing to take bullets for what we believe is right, instead of merely talking about it and 'thanking God' secretly it didn't happen to us. Nigeria is ripe for change, but that change will begin with individual action. when we are true to ourselves first, then to each other, we can change things. until then...we can only hope that the pigs don't make us worse off than the humans, to paraphrase Blair.

Sunday, November 02, 2008

Firefox 3 spellchecker vs me

better believe it. i win baby!

Waiting for God

ever heard of Waiting for Godot? you can find out more by clicking the previous link. sometimes, waiting for God can seem like waiting for Godot...it seems He never makes it. i realized why we get tired of waiting for God to show up with something promised: every time we're waiting for God, we're presented with the option of not waiting for Him.

today, some things weren't okay at home, and since i returned from church first, i could either go fix them or wait for my dad and brother to return to get them fixed. one of them was lunch. for some unknown sentimental reason, i was loath to get lunch (i wasn't in a position to cook it) without them being around. so i tried calling. all their phones were unreachable. i was hungry. really. so i waited. then i reached my dad. he said they were on their way. i waited some more. fell asleep. woke up. by this time, as Rudyard Kipling would say, my patience had already gone where dead crabs go. so i fixed myself something to eat. while eating it, i realized that this was the same choice we always have to make when waiting for God.

i can no longer stand with my arms akimbo and accuse Abraham of impatience, for i, too, have been impatient. i looked at the clock ticking, and said to myself, "God(ot) will never show up. looks like it's time to take care of business myself". and like Abraham, only the future can tell what i messed up by "taking care of business". i may not have been promised a son the way he was, but God has promised things in His word that i need/want, and sometimes i took the alternative and stopped trusting God. that's right. that's what happens when you choose the alternative. you pretty much say, "God, time's in your hand and all, but You live outside time. i live in time. and the clock's ticking. i need this thing now.". but what you get from your own efforts can never be compared to what God chooses for you. it may be a long wait, but it's worth it.

Looking for a .NET SMPP implementation

i work for a company that's registered as a WASP (or VASP, not really sure which is the official one now) with Glo, MTN and Zain, and we have a messaging gateway connected to these operators. we have clients we resell SMS credits to, and till rather recently we used the web service on our gateway to link our clients to the gateway.

however, due to certain things, my employer recently added the ability to use SMPP binds to our gateway. i cannot be certain until i check using a tool like Wireshark (geek call-out: any other tools that might make the job easier will be appreciated!), but i think that SMPP will consume less bandwidth than using the web service.

anyway, my boss got me and the other developer on our toes with different APIs that allow us build applications that use the gateway. since we already have working knowledge of how to build applications that use the web service, we were stuck with a COM and a Java component which use a custom protocol to talk to the gateway over TCP/IP, the SDK supplied my the gateway vendor, and different components for using SMPP (if you read my Facebook status message about fiddling with Java, i was trying to learn about a certain Java SMPP API).

since i program mostly in C#, i started looking for some component(s) to allow me use SMPP from my applications. i turned up quite a few:

  • A library written in C++ with a COM component that uses it: here
  • Easy SMPP
  • RoaminSMPP
  • The Devshock .NET SMPP component (For some time the site has been under reconstruction and so the files are no longer available from their site.)
  • InetLabs's ALT.SMS.SMPPClient class library
  • /n software's IP*Works: here

since what i was doing was trying out stuff, buying a component was out of the question. i'm also kinda biased toward open source, so that kinda kicked out IP*Works (don't get me wrong: IP*Works is probably very good - but i just didn't want it. i might try it out some other time). i got the others and started trying each one out, using a local SMPPSim server (SMPPSim is a Java program that emulates an SMPP server. great for trying out SMS appliactions)

Easy SMPP came with a demo application (there's also an SMPP server on SourceForge that uses it), but i couldn't connect to my local SMPPSim server using it (oddly enough, i could connect to the Easy SMPP gateway with it), so that was a no-go. i'll try it again some other time.

The Devshock component came with zero documentation (bad), no sources (i can live with that), and demo applications (client and server) written in Visual Basic.NET (i dislike VB, something that carried over to VB.NET. also, translating a program from VB.NET to C# without an automated tool is not particularly easy, even if you can do it). somehow, i got a demo application working with it Friday, even tested it on our live gateway.

i should have been satisfied, but the Devshock component has gone two years with no updates (which really shouldn't be a problem - the SMS specification is frozen and the SMS Forum shut down). so this weekend, i tried getting the RoaminSMPP component to work (incidentally, it was updated in October, but the author won't be working on it anymore) at home, and i sort of prefer the way it's structured than the Devshock component (it uses event handlers quite a bit instead of return codes and error messages). it does have its bad sides though. it comes with zero documentation and examples. i had to load up my trusty copy of .NET Reflector (one of the greatest .NET tools ever!) and the sources to find out how to use it (also did that with the Devshock binary, but the InetLab one was obfuscated - only one namespace of five was not).

i'm yet to test the InetLab binary - and yes i know: i probably am being an idiot, since i already have one that works (two, to be precise. why knock it?). still, if i'm giving the component to someone else to use, i may need to recommend the one that's simplest to use. anyway, you already got here. go read something else for now. i've nothing more to say here (far too many acronyms, if you ask me) :D. have fun!

Tuesday, October 21, 2008

Installing Silverlight 2.0 Developer Tools

as you might know, Silverlight 2.0 has been released. as i am wont to do, i went over to the site and downloaded myself the Silverlight 2.0 Developer Tools, which updates Visual Studio 2008 SP 1 and/or Visual Web Developer 2008 Express SP1 to work with the new release. unfortunately, the setup does not include Silverlight 2.0 Developer Runtime, and always attempts to download it (when i tried it on my computer, even when i'd downloaded the Developer Runtime and installed it separately, the install wizard still downloaded the Developer Runtime setup). to forestall this, download them both, unpack the Developer Tools setup into a folder (it's just a self-extracting package - almost any decent archiving utility on Windows can do this, i recommend 7-zip - WinRAR, ZipGenius and TugZip also can - i can't tell if WinZip does), and copy the Developer Runtime setup executable to the same folder. it won't download anything. well, work calls. later!

Monday, October 20, 2008

back at work...

got back to work today. late. it almost took me 2 hours to get to the office this morning. it only took 20 minutes yesterday!

crazy item of the hour: Exception occurred: OutOfMemor (thanks to edcba)

Wednesday, October 15, 2008

4x4=16

Biyi told me this joke a few days back, and i thought i should share it. there was this guy who bought a jeep with '4x4' on it, and was seeing a lady in a certain area. around there lived a not-so-balanced boy who saw the jeep everyday. one day, he took a stone and scratched '=16' after the '4x4'. later on, the owner came and saw his vehicle defaced. he got it fixed, but the same thing repeated twice. the owner then decided to add the '=16' after the '4x4' himself, and asked the body shop to do it for him. the next time the schoolboy passed the jeep, he saw the new 'equation'. he then took a stone and scratched 'VERY GOOD' and a tick on the jeep.

Fixed-position footer

i've been working (more accurately trying to work) on the TOS Funerals website design so it works well in older browsers, because it degrades horribly in them. for this to work, i needed a technique to force a footer to stay at the bottom of the window whether or not the content filled the window. the first technique i tried was from Boagworld. it worked like a charm - but only in newer browsers (Chrome, Firefox 3, Flock 1.2, IE 7, Opera 9.6, Safari 3/Win). it completely failed in IE 5.5 and 6 (quite unlike the advertisement. my guess is IE 5.5 and 6 don't understand the conditional comments).

so i got my rubber gloves on and tried getting a new technique - once again a Javascript-free method of getting about it. from yesterday's tests, this technique from Dave Woods' blog worked in IE 5.5 and 6, as well as the newer browsers. guess that's what i'll be using for now.

Update: the fault was with me. the Boagworld technique works. quite well, in fact. and it's smaller in both markup and styling.

here it is in Chrome:

Firefox 3:

Internet Explorer 5.5:

Internet Explorer 6:

Internet Explorer 7:

Opera 9.6:

and Safari 3/Win:

Monday, September 29, 2008

Code Geass is over!

i never really wanted to watch Code Geass: Lelouch of the Rebellion, because i read about it and found out Lelouch killed his sister. at any rate, someone got me watching it and i have to admit it has an extremely gripping story.

on Saturday, a friend came over and it suddenly struck me that Lelouch was planning his death, and i mentioned as much. there was only one episode of the second season left and it was to be shown yesterday (Sunday). the name "Zero Requiem" had been tossed around and i realized that a requiem is a song for the dead. it was brilliant how Lelouch executed his death. i kind of was hoping for a happy ending, or some romance, but it was not to be. ah well. i guess he really did make everyone happy. in that, he and Suzaku were heroes, but he was the unsung one. great story. hopefully now the twins will give themselves some peace...

Wednesday, September 24, 2008

bringing you up to date...

so what's been happening in recent times is i got into some serious trouble i had to take care of, so i've only been to work once this month. heheh...you can imagine what that means about blogging — it had to take a back seat. plus i fell ill for over a week. the one good thing about it is i confirmed i'm not fat, since i hardly ate throughout the period and i didn't lose weight :D. no, i'm not back to work, nor am i at home. you can just keep guessing — maybe i got someone pregnant? or killed someone? just keep guessing!

down to what Neo calls geek-stuff: why, oh why must programs install on C:? and why is the install procedure for Microsoft SQL Server 2008 Express so involved and such a pain in the butt? i don't have Visual Studio Service Pack 1 — so what? SQL Server 2005 Express was about 240MB, 2008 Express is over twice that - and still without Books Online. why would you give me a product that large and not add documentation? i am not always online! arrgh! at the very least, give me a choice of the packages i want to download if you're really interested in helping me conserve bandwidth. i've stopped ranting about Microsoft alone by now, but every company that will supply software over the internet. Thanks if it's free (whichever way), but there are parts of the world where it sometimes seems God turned off the internet. help the people in those areas too...it might be a pain implementing, but if we can choose before we begin the download, it might help some of us who don't know everything about everything...

anyway, i should soon be back home and i can at least update my antivirus program again. later then!

Saturday, September 06, 2008

Waiting for God to turn off the internet...

...but while i'm waiting, i'll say hello - it's been a while since i updated this blog last. hiya doing? hope you and all your important people are doing well

now to today's business. i'm writing this post from Google Chrome, which i must admit, looks pretty good, especially for a beta product. however, it's spellchecker doesn't recognize the words "spellchecker", "plugins" or "google" (specifically in lowercase). and i don't know how it will do with plugins like Flash. and even though it's still early days - why can't i customize where the install goes to? huh?

dude, web design isn't for the fainthearted. seriously. i've been working on a redesign of the TOS Funerals website, and it's not exactly been a walk in the park getting the design to work cross-browser. i swear Internet Explorer has some beef with me. first, the content area isn't set off properly as it is in other browsers (even in IE 7 standards mode!), and i've been unable to fix that so far. something else i got fixed was the fact that IE kept drawing a border around my horizontal rule. i had to do two-step hacking: add extra markup and styling. grrrrrrrrrrrr! i've some idea how to go about it now, but i still think it bears mentioning since i haven't actually fixed it: forcing a page to be at least as high is the browser window so the footer "sticks" to the bottom of the window, irrespective of how much content is actually in the page. my own solution saw the footer somewhere in the middle of a long page in IE (again). many thanks to the guys in #css on Freenode for steering me aright - this dude is much obliged. the testsuite for the new design is available at http://www.tosfunerals.com/newsite/testsuite.html (creating this post revealed that Chrome's text selection drag and drop always moves text, irrespective of whether or not you hold down the Control key...sigh!)

Sunday, August 10, 2008

Grouse with Facebook

morning. been a while since i last visited. well, i went to Ife and was offline almost all the time i was there. have you noticed that if you make a mistake signing in to Facebook, you hit Escape/stop the page, then try signing in again without refreshing, you can't sign in anymore? why are the Facebook developers using Ajax for the login page? wouldn't a simple submit form have sufficed? and if the Ajax was completely necessary (for instance, some webmail providers encrypt the password at the client's end before the login form even leaves the client), it shouldn't put the page in a state that the page is unusable if the user cancels it. not good, in my opinion.

Tuesday, July 29, 2008

O/RM and templating

i have a problem. i'm sending text messages to people based on data in a table. but people being who they are, they want to change the message structure at will. and the structure is currently hardcoded. so if i want to make the structure dynamic, i need a template system. i also need to map specific table fields to those template variables, then make the template changeable at runtime. that requires O/RM, so i can map table fields (relational) to objects i create in my code, and all the SQL is generated on my behalf by the O/RM engine. so far, i'm going with ActiveRecord and NVelocity from the Castle Project. i've used NVelocity, so i hope i'll get the same level of success from ActiveRecord (so many dependencies though :)

IQ tests are warped

Warning: shameless plug coming up! i added the IQ test application in Facebook. later on, the Advanced IQ test was recommended, so i added it and took the test. when i completed it, i found out of 15 questions, i only answered 13 and only got 6 right. yet when my IQ was calculated, it was rated over 100 (no, i am not telling you my computed IQ), which is not bad. in fact, it was higher than what was calculated using the regular test. hence my think they are warped. oh, 70 is idiot territory, so i guess i'm okay

Saturday, July 26, 2008

Avatar is over!

finally, i've watched all the episodes of Avatar: The Last Airbender. i have to say that all in all, the series was good. yes, there were some parts that really could have been cut out (like Season 3 Episode 17, The Ember Island Players) or modified, in my opinion, but then that's just my two cents.

stepping into Subversion

i've been joined by two other developers at work, so i needed to give them access to the code i'd written. i saw it as a great opportunity to try out version control, so i gave one of them the task of learning Subversion. he hadn't gone very far with actual implementation, and then my boss put him on something else, so i thought to myself, "what the heck" and started reading about subversion myself tonight. i installed the Collab.Net Subversion server, then TortoiseSVN and began scanning through the book (what? you expect me to actually read it? maybe on your time, not mine. it's past 2am here, for crying out loud).

i set up a repository, checked out, added a new file, tried to commit, then boom! authorization error! now the subversion book didn't say anything about this. so i downloaded HydraIRC, connected to Freenode, and joined #svn and ##csharp and asked. after some time with no answer, i went googling and found that a default repository allows anonymous reads and no writes, especially if you're connecting using svnserve. later on, someone gave me the same answer i got while googling. also got some useful tips, from the channels and the TortoiseSVN manual. in short, if you're going to use Subversion using the svn:// protocol (using svnserve, that is), you're going to need to configure your repository correctly. since it's in the TortoiseSVN manual, i'll refer you Windows users to it. please read Chapter 3, Section 2: Svnserve Based Server. everyone else, please look here for a few tips on configuring your repository for read/write access.

Saturday, July 19, 2008

i didn't go with .NET configuration files...and would like your input

i've been working on an application that needs to get some configuration parameters at runtime. at first, i thought of using configuration files, but then i realized that i would need to create another application that would be used to change the config. usually, an application config file is "tied" to the specific executable that it is created for, so - not being comfortable with XML in .NET - and having a tight schedule, i looked into other options. one was the registry and another was a custom config file. right now, i'm using SQLite as my storage medium, with the advantage that i can use the relational model if i need it. obviously, it has some drawbacks, but so far, i've got used to it. let me know what you think - assuming you do think anything.

Rant: why is Opera taking a long time to open Blogger - with no activity whatsoever? it's happened twice already...

Friday, July 18, 2008

The past week in review

hiya. been almost a week since my last post here. ah well. just wanted to bring you up to date with what's going on here, "here" being my life. grrrr. my neighbours decided today to have a party (an all-nighter by the sound of it), meaning there's going to be quite a bit of noise around.

in case i didn't mention it, i was in school last week. saw a couple of the guys, stayed over at Biyi's place while i was there. he seems to be getting along with his final year project and other stuff in his life. i'm happy for him. anyway, while there, i got some anime and have started watching Black Lagoon and Katekyo Hitman Reborn. i've also started Monochrome Factor and almost completed Hayate The Combat Butler. however, the anime series that currently has occupied my time is Code Geass. i started on Saturday and have almost completed season 1. i don't think i'd want someone like Lelouch as my opponent. my current fantasy revolves around a showdown battle of wits between Light Yagami (of Death Note) and Lelouch Lamperouge. sadly, this just reminds me of just how far behind i am with anime. Bleach, Eyeshield 21 and D.Gray-Man are all examples of abandoned anime projects. maybe you now understand one of the reasons i hate my job.

Wednesday: some local government people came around the building where i work and started complaining about the environment. so i don't bore you, they locked me and some other people in the compound. i had to jump over the gate to get out. i heard they later opened the gate - which is good, since almost everyone left in is female. every time i look at my right arm i remember - because i got scratched getting out. fro crying out, it's over 10 years i last did something like that!

Tuesday: i found that Visual Studio's debugger is superior to SharpDevelop's in one respect: if you're debugging applications within the environment, SharpDevelop's only catches uncaught exceptions. So if you're using System.Timers.Timer.Elapsed (for example), you'll never catch any exceptions. Visual Studio's, however, has no such compunctions, and will show exceptions even though the Elapsed event handler suppresses all exceptions. i can tell you that that's what saved my bacon on the current project i'm handling.

Monday: this project is my first experience with Oracle (even though i've had the express edition for almost a year), and if there's one thing i've learnt: always use 4-digit date literals in Oracle, especially if (like me) you're from a MySQL (or other database) background! i spent the whole weekend plus the greater part of Monday wondering what bug in Oracle i uncovered, only to find it wasn't a bug, just an Oracle quirk.

i've a custom class in my application that stores database connection parameters (previously in individual variables) - server, port, username, password and whatnot. since i'm moving to deploying the application solely on SQL Server 2005 Express (maybe PostgreSQL when i have the time to learn it) for now (no thanks to the many quirks of Sybase), i'm now simply hosting a SqlConnectionStringBuilder in the class. you really can't beat KISS.

while i'm still a newbie at regular expressions, i can definitely say they're great when they're used rightly. if i had to write custom code to validate phone numbers, i'd probably have a minimum of 20 lines of code, plus new if clauses (or similar) to write if the networks change. thanks to regexes, i can validate Nigerian GSM numbers - with or without country code - with about 3-4 lines - including creating the System.Text.RegularExpressions.Regex objects i want to use. and if i need a new case, i'll just have to change the pattern string. a pity more Nigerian developers don't seem to know about regexes - unless i'm wrong.

i need sleep! 'nuff said.