June 2006

Flames, what flames? This is a full blown fire here! Quick, someone get the marshmallows!

Where did you get this installation media from, just out of interest? Did you download them, say, a DVD iso? Sounds rather large, if you aren’t going to be installing most of the packages by default.

If you aren’t going to install the compilers at install time when you know you want to use the system for development then you deserve to have some extra trauma. Granted the complete install ISOs are rather large, but since I personally know of only 2 people who do not have broadband this really shouldn’t be a major issue now-a-days and as you so kindly pointed out, if the large downloads do cause problems then there are people who will ship you CDs for a small charge. A friend of mine assures me that shipit will ship you one, or more, Ubuntu CDs completely free.

I think we might need pictures here.

  1. First of all we’re going to visit the website of a popular search engine, known as Google.

For some completely crazy reason I was using the search box at the top of the MicroSoft homepage to search the MicroSoft website for it, using various combinations of “Visual Studio”, “Express Edition” and “Download”. It took three searches to find a link which looked remotely relivent and I then had to follow a significant number of links to actually get to the download page. Perhaps Google is better at searching MicroSoft’s website? In future I will try to bear this in mind.

Visual Studio has a global library path, very useful for these library things. It even has a nice GUI to configure it! To access it, under Visual Studio 2005, follow: Tools -> Options -> Projects and Solutions -> VC++ Directories -> Show directories for: Library files.

Any path added to there will be searched by your project.

I didn’t know this. I was following the help pages(!!!) which just told me how to add the libraries to individual projects (I must have overlooked a section or page or something). Thanks for the info.

I wasn’t refering to the labeling of the menus, I was refering to the fact that they will be accessible via. alt keys (if they exist at all), and that windows will attempt to fill in any access keys that the application has failed to specify, meaning that you’ll always have a consistent interface.

I’m not sure “consistent” is the word I’d use, since the programmer can arbitarily bind the keys and hence override the defaults which Windows would like to use, however fair point that the menus will always be accessible via the alt keys assuming the application is using the Windows toolkit to draw its menus.

Hope that helps :)

It certainly does. Today kids we have learnt; Goole > Microsoft for searching (well, I knew this already – afterall it is what Google /do/ – I just need to learn to apply it), Visual Studio does in fact have a nice GUI interface for everything and do not draw menu bars in Windows without using the Windows toolkit and using non-”standard” activation keys.

Rants
Technology
Windows

Comments (0)

Permalink

Yay, flamewar-by-blog

In order to address Faux’s response to my previous post, I’ve decided to write this post;

Besides the fact that the (vast) majority will never need or want to compile anything, the top four linux distros (according to DistroWatch), as far as I know, don’t come with a compiler in the default install. That’s hardly “(almost) every”.

This is true, the majority of Windows users will never need or want to compile anything. Linux, dispite a lot of recent progress to entice desktop users, is still pretty much solely used by developers and hobbyist who have to compile things, hence the ready availablity and easy-of-use of the standard development tools on the platform.

According to distrowatch, Faux’s own source, all of the top four distros ship gcc (the defacto Linux standard compiler) with all of their releases. I do not have the time or inclination to install each one to find out if it is in the default package selection, and even if not it’s still a single tick-box away and can be installed from the installation media rather than a large download away.

I have to goto the website of each of the libraries I need…

Not for any of the libraries that are included with Visual Studio, such as the list of them in the Platform SDK (all 198 of them), and the optional library packs such as the DirectX SDK.

What you mean here is that the maintainers of many libraries that are freely avaliable on the internet are not catering fully for those of us developing on platforms that aren’t UNIX-like, and aren’t using gcc and bash?

Have you tried navigating Microsoft’s webiste? You providing direct links to the relivent pages and saying it’s easy is all well and good, but it took 3 searches and 20 minutes following various links to find a download page for Visual Studio Express Edition.

Additionally, once downloaded and installed I still have to add the library paths for DirectX’s libraries to the search paths for any project requiring them.

I do, however agree that there are many free libraries which are not adequately supported on Windows and other non-GNU-Make/gcc/… systems. Perhaps this is because it’s so damn hard to get the Windows development tools to actually behave and compile them before you even start thinking about fixing the platform-specific code problems.

Windows ships with many productivity tools, most of which cause incredible levels of complaint from people from a UNIX background, and/or work so well that they aren’t noticed. The whole network configuration system (including dhcp/ppp/firewall/auto-time-sync/wireless/SNMP/UPNP/SMB/WNB/..), for instance. Do any linux distributions have this level of utility in the base install? I’d guess that, for a binary system (which those 4 linux distros mentioned were), networking is slightly more important than a compiler?

Windows, however, doesn’t include a complete office suite (for free!). I know it’s a classic pro-Linux argument, but it’s valid. As for the whole network configuration system, I’m yet to meet a Linux distribution which doesn’t just work on a properly configured DHCP network. In fact, Window’s DHCP client doesn’t actually comply with the specification which means users have to use command-line tools to get a DHCP lease when moving to a new network before the lease on the old network times out.

A number of the top distributions ship with complete firewalls and all will work with compatible wireless network cards (any argument about lack of hardware compatibility is null-and-void since the lack of Linux support is due to the hardware manufactures not supporting it and refusing to release the hardware specification for the Linux community to write drivers).

Windows has this wonderful thing known as a standard (unless, say, the application was built against something vile such as QT or Mozilla’s engine) with respect to the menu being drawn, such that you know that all of the menu items should be accessible through a “chord” of alt+a series of other characters. Applications tend to follow sequences, too, like Alt->f->s for File-Save. Does that count as using the menu, or as hotkey? I’d vote for hotkey.

I like the ’should be’ in there. As far as I can tell (I may be wrong) this ’standard’ is a defacto standard and applications do not have to comply if they do not want to. The fact that the character which activates a menu is programmatically assigned by the developer means it could be anything. Sure, most people use ‘F’ for file, but as a developer there is nothing to stop me using ‘F’ for format. Once you know the sequences, you will be able to rapidly access the features you use often in the application. The same can be said of VIM, although the learning curve is considerably steaper (yes it has tab-complete on commands, but the are no nice menus which Windows users seem to like searching through).

I’d recommended TextPad, it’s really great once you switch it to Windows-compatiable hotkeys mode. ;)

Personally, when forced to use Windows for development (e.g. at work before I started taking my laptop in, in order to save my sanity) I used to use Crimson Editor. Unfortunately this is now a bit out of date, and have not been update recently so I’ve switched over to using PSPad. Unlike TextPad it’s freeware. I hope you’ve paid £16.50 for your copy of TextPad, Faux.

Rants
Windows

Comments (1)

Permalink

I don’t want it to be intuitive, I want it to be useful.

In today’s ‘Computer Weekly’ magazine there was an article on page 10 entitled ‘Microsoft has never been just about Bill Gates’. Contained within this article was the wonderful paragraph:

Office 2007 is going to boost productivity for businesses and with Windows Vista we are going to see a step change in the operating system that is much more flexible, mure intuitive and more secure than ever.

I prefer to use Linux for just about all of my work, although my desktop computer still runs Windows so I can play computer games. Why do I prefer Linux, well for one VIM. I know GVIM is available for windows, but it just doesn’t have the same feel as proper command-line VIM even under X11. There are a number of good text-editors for windows which allow the use of regex’s etc, and I could probably use one of them relatively well after finding and configuring appropriate shortcuts so I don’t have to use the menus. The major fall of Windows is the lack of a development environment by default. Under (almost)every Linux distribution you can download a suitable packaged program in .tar.gz format, extract it, run make and it will compile and most of the time correctly find any libraries which are required providing they are installed. Using VisualStudio Express edition (the free, cut-down development environment Microsoft have recently made available) I have to goto the website of each of the libraries I need, download and install them seperately (oh for package management which allows the whole lot to be installed with one command), then add each of the places where these annoying installers put the libraries to the project’s library search path before it will compile. This is harder, more time consuming and downright frustrating than just running ‘make’.

Windows is already intuative enough (in fact, far to much so in my opinion), perhaps Microsoft should take the time to actually make the system useful instead of trying to simplify things further for the user (XP’s default Control Panel which doesn’t give you access to half of the applets anyone?).

Rants
Technology
Windows

Comments (1)

Permalink

Samba lameness

While playing with my new remote server from tektonic I installed and setup virtual domain hosting for various subdomains of entek.org.uk (including blog.entek.org.uk :) ). Additionally, with the help of Tim I set up subversion and trac and created repositories for my config files and for my third year project. I’ve even already got some tickets I’ve filed against my 3rd year project!

Since I have this new server I have complete control over, and is accessible from anywhere with an internet connection I decided that it would be a good idea to set up duplicates of the websites I work on when emplyed during the holidays. Additionally I will be able to use svn for revision control of them, so no more developing on the live system and easy reverting to old versions.

I then decided to dig out a backup of work’s websites I happened to have lying around (although it’s from December, so just a “little” out of date). Since I was feeling lazy, and it was convenient at the time I decided to plug the USB storage device the backups were stored on into my desktop (running Windows XP) and use samba to get the files onto my laptop (running Debian). Upon connecting to my desktop I found that smbclient just quit with an error, ‘tree connect failed: NT_STATUS_INSUFF_SERVER_RESOURCES’. Google appeared to be not terribly fothcoming with a solution, but some refinement of the search found a Tips and Tricks page with a solution. Apparently Windows was being speshul (surprise, surprise!) and by (creating and )editing the DWORD registry value at “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters\IRPStackSize” to be higher than the XP default (15 or 0xf) everything magically started working. I used the value suggested by the website of 17 (or 0×11). Just remember that the value you’re putting in is in hex, or you could get a nice surprise ;) .

Debian
Linux
Technology
Windows

Comments (0)

Permalink

Courier-imap-ssl woes

In order to be able to resize RAID5 arrays in my mailserver, I upgraded from Debian Stable->Testing as it broke less than trying to manually install the relivent packages needed from experimental and unstable. In order to resize RAID5, according to Steinar H. Gunderson, you need a 2.6.17-rc* kernel and mdadm tools>=2.4.1. Thankfully the updated mdadm tools are in unstable so installing them on testing was trivial. linux-imager-2.6.17-rc3 is in experimental, so installing that was also strightforward, just a case of adding an experimental source, aptitude update, aptitude install linux-image-2.6.17-rc3, and removing the experimental source).

After the stable->testing upgrade everything seemed to be working fine. My mail was still being fetched and delivered locally, mutt was working fine, apache2 was still running and the imaps daemon was still going. This morning I tried to access my email through the copy of SquirrelMail I have installed for eash access without having to ssh into the box. It failed to login with the message:

Error connecting to IMAP server: tls://localhost.
115 : Operation now in progress

To see if the courier-imap-ssl daemon was just not accepting connections I fired up Thunderbird (which I havn’t used in sometime, since setting up my mailserver). Thunderbird connected successfully and happily talked to the mailserver, fetched my current inbox and allowed me to poke my emails although it didn’t seem to like some locally created emails with attachments (it just refused to show the attachments). Starting the non-ssl daemon and telling SquirrelMail to use that instead work, but it should be able to use the ssl daemon. It was working fine under stable!

According to DirectAdmin Knowledge Base the error is caused by a bug in PHP. Their solution seems to be to rebuild everything from source. I think I’ll try some less-drastic solutions first, such as downgrading SquirrelMail to the version in Stable, and if that doesn’t work downgrading PHP too. or I could try installing PHP5 (I assume it’s still using 4.something atm).

Anyway, I have two exams in the next 24hours so more pokeage of this will have to wait until the weekend.

**UPDATE**
Following some interesting reading on php.net,freebsd.org and bugs.debian.org on the matter I decided to try installing PHP5 (as those seem to indicate, on debian, the problem is an openssl<->php incompatibility). After installing PHP5 it all worked as expected. Hurray! Now for some revision, honest.

Debian
Mail
Technology

Comments (0)

Permalink

Dll Hell

While playing with media players for windows, I installed Songbird which uses the same engine as Firefox and friends to make a music player. When I tried to run it, it failed with “msvcr71.dll missing”. For those of you who don’t instantly know what that is, it’s the Visual C/C++ 7.1 runtime needed to run applications developed with Visual Studio 2003. According to Microsoft this dll is included in the .NET framework 1.1 – this is a great help when Windows update bypasses 1.1 and went stright for the 2.0 version of the framework which, evidence suggests, doesn’t contain this particular dll.

The dll itself is redistributable within the terms of the Visual Studio EULA and redist.txt, and in fact probably should be redistributed with applications which use it (Songbird developers, if you’re reading this, please include redistributable dll dependancies in your installer) and seeing as the dll is under 200k in size this really shouldn’t be an issue.

That aside, the Microsoft website seems to offer no way of downloading the dll or a package containing it. A number of dll sites allow the file for download but thats hardly a simple solution to what is, in essence, a simple problem. Imagine asking your Parent/Grandparent/$other_non_tech_savy_relative to navigate one of these sites, download the file and install it in the correct place. The easiest way I found was to install Acrobat Reader 7 which also uses (and redistributes in its installer!) the Visual C 7.1 runtime.

Would it really be that hard for Microsoft to make a repository of all the DLLs they have distributed, and instead of the useless ‘xxxxxx.dll not found ‘ message have a ‘xxxxxx.dll not found, would you like to download it from Microsoft’s DLL repository ‘ which would then do off, fetch the (200K!) dll from the internet (or add it to your next Windows Update list, and integrate the entire thing with Windows Update) and install the thing in the correct place without the User needing any technical know how (like, say, almost every Linux distro’s package management system (which would have resolved dependacies at install-time so this problem wouldn’t have happened ;) )). This would be a really usefull feature if Microsoft were to incorporate it in their next version of Windows.

Rants
Windows

Comments (0)

Permalink

Language, Language, Language

I’m yet to settle on a final language to write the core of my Bot in. This is both advantageous and a hinderence. It means that I’ve not committed myself to a language, which at a later stage will prove to be insufficient or extreemly difficult to use for the intended task. Conversely it means that, at the moment, I cannot write any final code and I’m rewriting portions of the same code in various languages while I try out the options.

Initially I looked at Python as the inbuilt structures (lists, dictionaries etc.) lend itself to easy storage of socket information and trivial implimentation of buffers. I had recently been having a go at rewriting it in C++, which is proving to be much harder than it first looked.

While randomly browsing the web, I began looking at various language’s benchmarks on the great language shootout I observed that (as you’d expect) Python, Perl, $other_interpreted_language < java, mono(C#), $semi_compiled_language (by which I mean it's not compiled to native code, but rather runs through a VM or similar) < C, C++, $compiled_language. No surprises there. The core (and security module) of the Bot are going to spend most of their time pushing data (strings) between the various sockets. Ideally they want to do this as quickly as possible to keep the overall performance of the Bot as good as possible (hence why I was looking at C++).

While I was (virtually) pitting various languages against each other I found the D is actually comparable, performance-wise, to C and C++. This impressed me, I was expecting it to be slower, more comparable to C# and Java due to the garbage collection and other features it shares with them.

After browsing the D website and other community sites linked from there I found that D aims to be, essentially, C++ with garbage collection and dynamic memory allocation. The Wiki4D has many more usefull links to community websites. This D tutorials page also looks like a good place to start with learning the language.

To quote its website, “Mango is a collection of D packages with an orientation toward server-side programming“. It includes, among a lot of other suff, a socket class. This could be very useful, at least initially while poking the D language even if I drop D in favour of something else or end up writing my own socket library.

Well, at least I’ve got something else to procrastinate over for a few more days ;)

3rd Yr Project
Technology
Web links

Comments (0)

Permalink

Shiney hardware and IBM Recovery Disks

My new hardware turned up yesterday. I’ve installed the RAM and Case fans in my PC (although one of the fans isn’t quite fitted properly – it appears to be the only (normal)case fan I have ever seen which is not reversible (i.e. designed to be mounted either way round depending on whether I want to suck air in or blow it out). Still, some blistered fingers and brute force later it’s in and working.

Also in my hardware order I bought a 512MB usb pen-drive. Although I own a 64MB Creative Mu-vo it just doesn’t have the capacity for anything in addition to music (it holds just under a CDs worth of 128Kbps MP3s). Having bought this drive, and copied all of the lecture notes for the up coming exams onto it I decided I would have a go at putting some usefull apps onto it;

Last night, after returning from the LUG I also copied to contents of the 5 IBM recovery discs onto a hard drive in my desktop. This morning I burnt the files to a DVD, and once I’ve backed up the current contents of my laptop to external hard disk I’m going to test it. If it works it’ll be a fantastic improvement on having to swap the CDs backwards and forwards as the recovery program demands.

In the mean time, revision is called for with tomorrows exam being dangerously close.

Rants
Technology
Web links
Windows

Comments (0)

Permalink