Filed Under: opinion, programming with 2 Comments
I just couldn’t resist
Had to log into Windows today and on startup was presented with this dialog:
What do you do?
Filed Under: OSS, technology with 0 Comments
Quite simply, the very idea freaks me out. The way NTFS partitions are managed in Windows… well, let’s just say resizing appears to be less straightforward than it makes me comfortable. And yes, there are some tool$ available to do the job securely, but again, in an emerging economy, some tool$ are just not priced affordably. Hello, GParted.
Defrag your NTFS partition (mostly ‘cos it invokes a layer of warm and fuzzy doing so)
Download the GParted LiveCD, burn the ISO (while we’re on the topic of burning ISO’s from Windows, again, it really is a bit of a unaffordable freeware/shareware mission)
Boot up with the LiveCD
Resize your NTFS
Reboot back into Windows (this allows windows to do it’s own CHKDSK on the “new” partition)
That’s it. Did it work? Oh yeah, it works. No corrupt programs, data, files, nada. Even my Lenovo SecureDrive volume is still intact…
Filed Under: javascript, maths, programming with 0 Comments
Floating-point arithmetic on a computer is hazardous, at best. This post is not a detail description of the problem. Varied descriptions of the problem already abound, like this one, for example. There’s also documented pain out there to understand that it’s not just your computer
No, this post is just one way of getting around the problem in a particular context.
The environment: JavaScript. The problem: convert decimals to fractions and fractions to decimals. Getting a decimal is straightforward:
function fractiontodecimal( wholenumber, numerator, denominator ) {
wholenumber = parseFloat(wholenumber);
numerator = parseFloat(numerator);
denominator = parseFloat(denominator);
return ( ( ( wholenumber * denominator ) + numerator) / denominator );
}
Obtaining a fraction was slightly more insane since in JavaScript
23.8 * 10 = 238
but
23.88 * 10 = 238.79999999999998
Not exactly what you need to work with. As you can imagine, inside a loop of sorts, and if the number becomes very small and you divide by it, you start getting bigger errors. Anyways, that’s a digression in itself. What i needed was a reliable way to multiple by a float by an integer, 10, and get a predictable response. In other words, i just needed to keep shifting the decimal point. Most immediate response might be: string manipulation. Isn’t that what JavaScript is for? :p
Another way was using e-notation. 23.88 being represented as 23.88e0. Multiply by 10: 23.88e1, and so on. The good news is you still get to do a little string manipulation, but not nearly as hectic as finding and moving a “.”
The particularly heavy looking string manipulation looking like:
newDecimal = mantissa + “e” + exponent;
That wasn’t so hard, now was it?
Browse through the code for decimal.htm (HTLM page with JavaScript)
Filed Under: .net, c#, programming with 3 Comments
Not gonna lie- it wasn’t altogether _that_ intuitive to begin with. Appenders, logging levels, loggers and a whole bunch of different configuration going on: it wasn’t just working. But, i thought to myself: many others are happy with it so it must be worth the initial pain. Of course, in a world of instant gratification and high-speed demands, how long exactly do you sit with a problem?
If it’s a maths problem, like something involving integrals, sometimes you can do nothing but sit with it. No amount of Google is ever gonna give you the answer. And if you think it can, i’ll happily take on the challenge
But this is code…
CodeBetter, CodeProject, Koders and even log4Net itself have plenty of sample code and tutorials designed to get you off the ground. And they all have their strong points so if you thinking about log4net, take some time upfront just to read how different people go about explaining various setups and configurations. You’re bound to find one you like. So back to this particular log4net experience…
What i wanted is to have an open console running which recorded anything i wanted while my asp.net application was executing. i love consoles ‘cos of their simplicity, power, flexibility and in-obtrusiveness. in the right place, at the right time, they definitely rock. So that’s the mission.
There’s this article which gave me a great jump start in the right direction. I made a few modifications (i am programmer) and as a result… well, this picture is worth a paragraph or two:
More than anything, this is testimony that log4net really does work despite some of the comments and posts (and initial pain) and once you’ve got it down, you can add massive geek-value to your project. You also just might have fun, but keep that to yourself ![]()
Filed Under: programming with 0 Comments
Worse Than Failure are hosting a little contest, which perchance happened to stumble upon. it is just for fun [eegads! don’t let anyone know you’re actually having fun programming] so my entry is up… who knows, maybe it’s a good enough attempt at winning that high quality JPEG! ![]()
Filed Under: technology, ubuntu with 0 Comments
There is a lot of hype about computing power, technology and what we _really_ need to everyday compute. We find a similar push with cellphone technology too… but what exactly do you really need?
I’ve just finished setting up Feisty… i am impressed. It really does just work. Out of curiousity, i ran a quick check to see what kind of computing power something funky like Feisty would need… and then compared to the current new generation in the Windows world…
Ubuntu Minimum Requirements (the recommended minimum)
500 MHz x86 processor
192 MB of system memory (RAM)
8 GB of disk space
Graphics card capable of 1024×768 resolution
Sound card
A network or Internet connection
Note: All 64-bit (x86-64) PCs should be able to run Ubuntu. Use the 64-bit installation CD for a 64-bit-optimised installation.
Vista Minimum Requirements
1 GHz 32-bit (x86) or 64-bit (x64) processor
512 MB of system memory
20 GB hard drive with at least 15 GB of available space
Support for DirectX 9 graphics and 32 MB of graphics memory
DVD-ROM drive
Audio Output
Internet access (fees may apply)
Uhuh.. not pretty.
Filed Under: sql, technology with 0 Comments
i must say i was quite surprised, in a negative kind of way, by the SQL Server 2005 Express Edition feature set. I took the leap and migrated databases from MSDE2000Sp4. All is well in the Express Management Studio and it ticks over for about 90% of the tasks i need to perform… but then there’s importing data.
Ya think i could locate _anything_ to import a flat file [.CSV] into a table? And bcp doesn’t count.
Eish. The MS forums are a tirade with respect to this issue, so i’m not going to add my rant
What there is though, is a pretty nifty solution i found on the jackol’s den
SELECT *
INTO theImportTable
FROM
OPENROWSET(’MSDASQL’,
‘Driver={Microsoft Text Driver (*.txt; *.csv)};
DEFAULTDIR=C:\dev\documents;Extensions=CSV;’,
‘SELECT * FROM data.csv’)
And walah!
Oh, and if you get an error like:
Ad hoc access to OLE DB provider ‘MSDASQL’ has been denied. You must access this provider through a linked server.
You can make changes according to MS Support.
Filed Under: opinion, technology with 1 Comment
Ever. Yet it’s so very important at the same time.
We drive processes quite hard, with good reason and positive intent. The process facilitates the change we desire and fosters an environment of learning with the goal of eliminating pain. Not a headache type pain (although it could be) but an organisational pain. And so in our pursuit to make things better, we create or adopt a process to either get us, or keep us, on course. But it’s not about the process and this is where i believe we have to be careful…
It’s too easy to get sucked into promoting or defending the process, above all else. And by process i am largely referring to the processes we use to deliver software. But this pervades far more than the engineering domain since it’s a social problem at the core and thus applicable to any socially organised group. It’s supposed to be all about the people, afterall it’s what sparked off the process in the first place. So throughout the process, the thing what’s most important is how the people, who are supposed to be positively impacted, respond. And to always keep in mind the difference between who they are and where they are.
And this is the part where English is a bit inadequate. In other Latin languages, there is a distinction in the verb “to be” that highlights the difference between the eternal and the temporal. It’s why you can never say in Spanish, as an example: I am hungry. You can never be hungry, you can only have a hunger. Moreover, there is a difference between being a programmer, and being a programmer. The simplest way i understand the difference is that being a programmer means it’s a calling, whereas being a programmer means that is your day job while in essence you’re really a bass guitarist who needs to pay the bills. In English it’s the same sentence: I am a programmer. And that’s the shortcoming in the verb “to be”. The consequence of which, methinks, is that we don’t distinguish often enough between the eternal and the temporal in our speech and leave ourselves open to interpretation, and more, blind ourselves in our ambitions.
While monitoring the process, and the way the people are responding to the process, we need to understand the difference between who they are as people in the eternal sense and who they are as people responding to change. What is more important in a social setting, is who they are in an eternal sense. This is the foundation for relationship, team work and ultimately, success in achieving the goal of the collective. Who they are as people responding to change is another dynamic. The former is more often fuzzy criteria for selecting team players, the latter for eliminating team players. And this is where the process fails: when selected team players are eliminated because they aren’t perceived as having integrated successfully enough into the process we establish. We choose process over people.
And at the same time, the process is super important. You cannot choose people over the process either since without the process, it would be hard to achieve anything, no matter how talented. And the subtle trigger lies in attitude. Let’s take the Agile Manifesto as an example. We value individuals and interactions over processes and tools. That is an attitude you need to manifest, not simply a great idea. And a time will come when the individuals and interactions (that are valued so highly) will sorely challenge the processes and tools: which you choose, if you choose, and the sum response to that crisis will define just how great an idea that really is ![]()
Filed Under: technology, ubuntu with 1 Comment
So far, everything’s going well. Ubuntu Edgy [Feisty coming soon] is installed and updated. Wrapped my head around keeping my computer updated and how to manage it. Also, tried out Kubuntu, but opted for Gnome instead and installed Edubuntu on my wife’s machine [dual boot with XP Home]. And it’s got everything you need.
Come to think of it, our computing needs [home users] are actually quite simple:
Email, web browser and some document creation software. Most applications and interaction take place on the browser anyways, so the rest is.. well, a lot less complicated than it’s made out to be. I know a lot of folk will disagree on that, but of all the thousands of applications we have at our disposal, a very small percentage are actually required.
And i think that’s part of the Ubuntu appeal. It has everything you need to compute. Off the bat. And then of course, you can go wild and install a thousand applications, if you really need to.
For Edgy and Dapper [spread over ubuntu, edubuntu and kubuntu] installations, instead of fighting to get WPA-PSK working with 4 different wireless cards, i changed the router to WEP with a MAC-filter. The path of least resistance
And it works like a charm. Feisty apparently has some added support in the WP-PSK direction, so we’ll look at that pretty soon…
Filed Under: technology with 0 Comments
i’ve been a Windows junkie for a long time now. Made my living living, eating and breathing Windows. From ‘98 to XP, and now Vista, i been using, coding, configuring, patching, coding [did i say that twice ;)] everything Microsoft. Funny though, my roots in computing go back to C, Borland nogal. Anyways, Microsoft-related work paid quite well, so it’s what i did- and continue to do. However….
Because i work within the education arena of software, it’s only inevitable that i’d come across a project like edubuntu, and from that, get infected by a whole other world. and slowly, but surely, things are getting infected, in a good way
But the challenge remains.. how do i migrate into a linux world? And why even bother would be a good challenge to pose… indeed why? Equally inviting, why not? More on that later.
First step, replace XP with Ubuntu as the primary OS for all regular “work”. Writing documents, emailing and IM, are OS-independant tasks. Developing asp.net, so so much.. but we’ll see [he says with a glimmer in his eye].
Fortunately, and i do mean fortunately, most of the implementation tools we use to develop asp.net are non-ms. Our choice IDE, as an example, is SharpDevelop. And interestingly enough, it won hands-down as IDE of choice against VS.Net [Express Edition]. It’s just soooo much more productive
And in case you’re wondering why not the full fledged VS.Net product: we compared apples with apples and the apples in this case, was $.
Hey! We live in Africa. We certainly cannot afford them shiny-looking price tags.
The adventure begins….
nogal is, as far i know, purely a south african term pronounced nau-chul, with the ch being closer to the classic Scottish ‘ch’ as in loch ness that anything else. kinda like you’re clearing your throat. anyway, it resembles the english equivalent: nonetheless.
The time has come, the Walrus said… Not moving very far, but consolidating the technology and personal ranting all into one uber blog. New location (location, location, location) is http://bryanallott.net/blog/. Updated feed URL (http://feeds.feedburner.com/bryanallottnet)
I say “industry” but there’s no real regulation put in by the government (at least here) which keeps the industry in check. For one, it’s not illegal to provide IT services or build software without a licence, while in more established industries, it is illegal to, for example, provide medical, financial, engineering or manufacturing services […]