Archive

Archive for the ‘Computers’ Category

Reducing My Bandwidth

July 7th, 2009 1 comment

I’m facing a rather practical problem at work, and it’s kind of highlighted to me one potential downside of AJAX based websites and Web 2.0.

I was recently shown a chart of bandwidth usage and number of web hits for people in my department at work. This made me immediately think that I should start to reduce my non-work web traffic to avoid showing up as a major blip on the radar.

One simple way I realised that I could do this was to reduce the amount of RSS feeds that I unnecessarily subscribed to, and to reduce the number of times I refreshed the feeds.

Then I realised, that every time I displayed a feed, I would cause my hits to go up. If looked at a feed in my RSS reader (the “Sage” plugin for Firefox,) I would cause an HTTP request for the page, and a request for every image. If I went away from the feed and then back to it, then I’d refresh everything again. If there are 100 RSS items in the feed, each with (say) 3 pictures in, that’s a lot of web requests. Couple to that, the “Read” status was based off of your browsing history, I have my suspicions that every time I marked a post read (even though I didn’t read it,) it caused a web request as well.

Since upgrading to Firefox 3.5, Sage has unfortunately stopped working, so instead I switched to Google Reader, which I was hoping should off load some of my hits to the Google servers and instead I would just see the changes.

Then I realised that all of these wonderful AJAX websites that I use are going to be doing the same damn thing. Every time an AJAX request is sent, that’s another hit. Thinking of GMail, that sends an awful lot of requests. Google Reader seems to be even worse – every time I scroll past a post I don’t want, it gets marked as read – that’s an AJAX request. It refreshes the posts list a lot too, that’s more requests. I’m now wondering too, whether the RSS feeds aren’t just parsed locally on your PC, and you’re still doing the same number of requests.

Unfortunately, I can’t find any technical reference for Google Reader to explain how many requests are made, and from which location (my PC or Google Server.) I guess Google aren’t really ready to give out the information to some of their architecture.

Even now, typing this blog entry, WordPress is continually using AJAX to save a draft version and to provide a word count.

It seems that the one downside to the Web 2.0 world is that if you’re being monitored in terms of bandwidth usage or number of web requests, AJAX (and the like) are most definitely not your friends.

For now, if anyone can point me in the direction of an RSS reader that definitely does cache images (and other embedded items,) and does not make web requests to mark something as read (and is also “trustworthy” in terms of security and preferably on some Free license) that would be helpful

Categories: Computers, Work Tags:

Woohoo!

May 1st, 2009 No comments

Rejoice! My new shuffle has arrived and it is small!

Having accidentally snapped the USB connector off my first gen Shuffle, I required a new one for the gym.

I ummed and arrred about getting the new style or the previous style as I have a habit of breaking the Apple headphones and there aren’t that many for other manufcturers that support the new style with the controls on the earphone lead.

Still, vanity prevailed and I bought the new style one in order to improve my lagging street cred!

Categories: Computers Tags: , ,

SQLite Concurrency

April 11th, 2009 No comments

Recently, I wrote an application that used a SQLite database and wrote data into a common database rapidly, over several connections.

I initially wrote the application to use one thread, and only one database connection, but as I improved the software, I converted it to use multiple threads with one connection per thread.

I quickly ran into the problem though that the database quickly became locked – one thread would block out the other and would not return the lock. It wasn’t consistent though as to which thread would be blocked – it was usually the second thread, but not consistently.

Having read a post from the pysqlite mailing list, I think it explains the problem a little bit more accurately, and kind of exaplins a solution. Although, it does seem a little bit drastic (essentially, reconnect everytime you need to run a concurrent query).

I’m now very interested to find out whether this will cure my problem. It does seem a bit drastic, and quite IO intensive, but it’s worth a shot!

I’ll let you know my mileage….

D and Tango

April 8th, 2009 No comments

The other day, I took another look at Tango, for D.

For those not initiated, Tango is a replacement library for the Digital Mars D programming language. It operates differently from the standard Phobos in terms of architecture, ethos and implementation style.

Having previously looked at it, my initial reaction was “Hmmm, seems silly to have implemented this, it doesn’t seem worth the effort to implement a second standard library”. I decided the other day to take another look at the project to try and understand it further.

Having read more about it, and tried to understand further, I can only say: “Wow”. It provides the langauge with the library to “do stuff” no simply a library with which to “implement stuff”.

I have an idea to resurrect my old FTPro software, and I’m now thinking that this would be a great backbone to develop this with. My only major hurdle to this at the moment is rebuilding my laptop….

Why I don’t like KDE anymore

April 8th, 2009 No comments

Note: I’ve recently found this as a “draft”. I thought I’d published it. Forgive the time references, I wrote this in January, not April!

For the past couple of years, there has always been something about the appearance of KDE that I didn’t like.

I don’t know when this dislike started, I think it was around KDE3 – I’m not sure.

The problem is, I’ve never been able to put my finger on it. I always used to think it was something to do with excess pixels around items that just wasted screen real-estate. Recently though, I begun to think that it maybe wasn’t just that (although there is still a lot of waste!).

Today, following the release of KDE4.2 RC1, I’ve managed to spot what my problem is.

Have a look at this picture: http://kde.org/announcements/announce_4.2-beta2/panel.png

Every single piece of text in that image, apart from the clock in the bottom right, is not vertically aligned particularly well.

Take for example, the list of running applications – why isn’t the text aligned vertically centred with the application icon? Look at the day in the calendar – why isn’t the text aligned vertically within each “cell”? It’s even wrong in the input element in the calendar!

Aaarrrgh! It’s enough to drive me to OCD distraction!

If you want an example of the wasted space – have a look at the vertical lists of applications open under the “Konqueror” moniker. Why is there a massive space at the top? There isn’t one at the bottom, so why at the top? Also, looking at it, the border around window list is different on all four sides of the list….

Categories: Computers Tags:

Why Can’t People Read or Think Outside Their Little Box?

January 16th, 2009 No comments

I’m amazed somehow about how people on the Internet do not read a question properly or think outside of their own little worlds. I’m always a little wary of tech information I read on the Internet, especially answers posted in newsgroups and forums, but sometimes, they are you’re only source and sometimes they are correct!

Yesterday, I was searching for information regarding a somewhat strange, but necessary question for my job. Simply put, the question was “How can I call a JavaScript function from within VBScript?”.

I found this page http://www.webdeveloper.com/forum/archive/index.php/t-49920.html

Hi Guys,

I have to use a JavaScript and VBScript in the same page. In the way that VBScript is calling a JavaScript.

Can anybody tell me how to call a javascript from a vbscript?

Thanx,
Ahmed

So, the question is the same as mine, albeit phrased diffently, and in broken English (that’s fine).

Straight off the bat, the first answer (from “matt.carter.25”) gets the context wrong:

You cant call VBScript from javascript,

VBscript is processed by the server before the page is sent, javascript works in the browser when its being viewed.

Hmm, no one said he was using ASP and Server Side VBScript. If you think about it before you act, it’s logical that he is using Client Side VBScript and Javascript.

The next answer is more helpful, and actually provides an answer (well done “Warren86”!). Two answer’s later and “matt.carter.25” is at it again:

I think what he is tring to ask is if he can call vb function using JS

This time, he’s got the question wrong! He’s got it the wrong way round! I mean, it’s not difficult to read the question.

Next answer from “96tunerri” is also incorrect:

yes he was, which cannot be done

Not only has he read the question wrong as well, his answer is not even technically correct.

Again, thanks to “Warren86”, his is proved wrong and a correct answer is posted:

Yes, it can.

<HTML>
<Head>

Finally, to add insult to injury, “Exuro” now preaches about VBScript not working for 20% of the Internet. Which is actually OK – I mean, the information that “Exuro” is preaching is accurate and it’s good advice – if you are creating an external website. At no point is it mentioned that the guy is creating a website, he just says he’s creating “a page”.

At work, I deal with HTML every day – my application depends on it for the UI – but it’s not a website that you can access with a browser (OK, you can, but it doesn’t work). We use nothing but VBScript, because we know for a fact that the pages will not be viewed by anything other than Internet Explorer.

How do we know this? Because the executable that is run is just a wrapper around the Internet Explorer ActiveX control….

So, we have one guy that can read properly, and checks his answers before he posts them, another who assumes a load of stuff, and 2 that are pretty useless. All on one page! Great!

Moving on further, a question was asked on programming.reddit.com yesterday – What is this key for: ¬?

The wonderful answer from “himom” reads:

that’s not a key.

Erm, yes, yes it is – otherwise he wouldn’t have asked the fucking question, would he?! Just because you can’t see it, doesn’t mean it doesn’t exist.

Jesus, some people.

Categories: Computers Tags:

Getting Fed Up With Word

January 8th, 2009 No comments

The past few weeks, I’ve had to use Microsoft Word a bit so that I can write up some specifications for other people to review, comment, enhance, reword, approve, you name it.

I am now soooo fed up with Word, it’s unbelievable.

The problem is, you can change things. There’s no structure system that you can use to force a document to do exactly what you want. Instead, you’re left with a series of stupid handling issues which lead to inconsistent documents across a department and people banging their heads on their desks in frustration.

Take, for example, my incident yesterday. Having reworked an existing specification from the ground up, I found cause to delete the final section of the document. This section was in landscape orientation, not portrait, because it contained some screen mock-ups (no complaint there). When I came to delete the sections, it changed every single section to be landscape, and changed the Page Header to be something completely different – in fact, it changed it to something that was not visible in the document to begin with, so I couldn’t even correct that.

I remember getting frustrated about this kind of thing before. That was whilst I was doing my final year project for my degree. I switched from Word to LyX.

Using LyX worked great for me, and I couldn’t have produced my final report without it, but I don’t think it would work in an office environment.

I think too many people are used to WYSIWYG, and not WYSIWYM (What You See Is What You Mean), and so would be constantly frustrated with the inability to see what your document looks like in Real-Time.

What I would love, is a cross between the two.

I would love to be able to create a rigidly structured document, where no one can change the text position, change the font, change the font size, mess with headers, etc – at least not without having to update a template. But as I’m typing, I’d love to see what that document would look like once printed, not the LyX modus operandi of “enter text, preview the DVI file”.

Couple that with a few more features, such as Word’s “Track Changes” and LyX’s far superior cross-reference and footnote handling, and you’re on to a definite winner.

Finally, just because you have to work with the rest of the world, some form of export to Microsoft Word format would be great.

Hey, Rich, feel like resurrecting “SLaTe”?

Update:

Ooh, apparently LyX now supports “Track Changes”. A lot can happen when you don’t use a bit of software for 6 years!

Categories: Computers, Work Tags: , ,

An Impressive Need

January 5th, 2009 1 comment

Last night, I amazed myself when I discovered I had a real-life, genuine, need for a Farraday cage.

I was trying to install my parent’s new Wireless printer, but unfortunately, it had joined the wrong wireless network and I couldn’t get it to leave that network and join the correct one.

Stupidly, the printer came with a utility so that you could set the IP address, and from there you could then connect to a web interface so that you can set which wireless network to join, and security settings, etc. That’s all well and good, but if it’s on the wrong network altogether, then you can’t set the IP, you can’t connect to the web interface, and you therefore can’t set the security information!

So, I decided to resolve the situation by blocking out the other wireless signal. I attempted to construct a Farraday cage with a Quality Street tin, and then place the correct wireless router, and the printer, inside the cage.

Sadly, Quality Street tins don’t make good Farraday cages.

I eventually resolved the situation by moving the printer next to the router, connecting it to the router with an ethernet cable, printing out the network configuration that the printer had picked up with DHCP, using the utility to set a static IP address, and then connecting to the web interface to force the correct wireless network and the correct security settings.

Jesus. Such an unnecessary hassle!

Categories: Computers Tags: , ,

SOAP, WSDL and UDDI

December 19th, 2008 No comments

Some years ago, I learnt (from a magazine) about SOAP. I decided it was useful, but not that many people seemed to offer a useful service for it.

At Uni, we had a handful of lectures about it from a guest lecturer. Here, I learnt about the concept of WSDL and UDDI.

Now, many years later, I’ve seen requests at work for SOAP access several times within two weeks, where in the previous 4 and a half years, I’d seen none.

We’re now going through the painful process of working out how to implement some of these things in Progress 9.1D (OpenEdge 10 supports it out the box, but 9.1D has nothing).

I’ve taken it upon myself to try and get my head around these things again, and to look at how we can sensibly implement these technologies at work in a way that suits not just my projects massive worldwide foot print (which is getting bigger by the month), but also with other internal applications such as Internet to Application transfers (e.g. Customer facing sites to back office systems)

Having looked at UDDI, I’m amazed that there aren’t that many applications available to run a UDDI service. I’m also slightly amazed that no one has attempted to create a basic VMWare image which runs a UDDI service out of the box. When compared to the number of “turn-key” SVN servers, email servers, groupware servers, no one seems to have done a “turn-key” UDDI server. Especially seeing as “SOA” is a particular buzzword at the moment.

I guess I may have to work it out for myself!

Categories: Computers, Programming Tags:

Upgrading WordPress

November 30th, 2008 No comments

It never ceases to amaze me how simple it is to upgrade a WordPress installation. In fact, just how easy it is to play with WordPress configurations in general.

I’ve now had to upgrade WP twice since going-live with it, due to various bug fixes and security fixes. Each time, it’s been a simple process of downloading the latest version, and copying files across. Nothing major, and nothing taxing. There are a few gotchas, but the documentation tells you precisely what to do and how to avoid them.

Even when I was beta testing WP and importing existing posts in to WP, I was investigating how to move it from one directory to another (so that it didn’t run in a subdirectory). Doing that, I thought, would be a complicated process. Not so. It’s still fairly simple, and most importantly, the WordPress documentation has a document about precisely how to move the files around, what order to do it in and how not to break stuff (although I did, and was quickly able to fix that thanks to the documentation).

That, is precisely how software should be. Simple, as long as you’re not scared about moving files around.

Categories: Blogging, Computers Tags: ,