Category Archives: Technology - Page 4

How to make you computer talk at start-up

If you want to try some different.

http://microsoftfeed.com/2011/how-to-make-your-computer-talk-at-windows-7-startup/

Now you can set it up to greet you – ‘Hello Dave. I’m HAL 9000..” hehe

Creating a zip file in .Net without using external libraries

I came across an article on Codeproject that show how to use the built-in Microsoft .Net 4 classes (hidden) to handle more generic zip files. .Net does have a public System.IO.Compression namespace but it only expose gzip class. There is also the System.IO.Packaging classes but it is proprietary interface to support only things like Office Open XML.

Fortunately the .Net 4 assembly WindowsBase.DLL contains some more generic zip file handling routines (MS.Internal.IO.Zip) but unfortunately it is not exposed publicly. With the use of reflection you can access it – although it is probably not recommended for general use as Microsoft can change the interfaces any time they like because it is not public. Also, because it uses reflection there might be a performance hit plus issues trying to use it while not running under Full Trust because it requires ‘ReflectionPermission’ permissions.

At least this is a potential alternative. On the long run it would be better if Microsoft expose a generic public zip file handling interface. There might be a licensing issue that is causing them not to include it – since the zip standard as far as I remember is owned by PKWARE and it is not public.

Tweaking your SSD

Toms hardware has an article about ways to optimize both performance and capacity of your SSD drive. I have one at home and will definitely run through their check list to try and optimize the drive – for speed, capacity and lifespan.

http://www.tomshardware.com/reviews/ssd-performance-tweak,2911-16.html

Some optimizations work differently on different SSD drives – depending on how the manufacturer implemented their hardware. Some ‘optimizations actually can make things worse so be sure to compare things before and after the change before you just accept it. Some optimizations might even be a bit controversial like the disabling of the paging file. It really depends on what you’re willing to sacrifice to reach a level of performance you can live with.

XML file as a database – part 1

I’ve been toying with the idea to get alternative for a ‘local database’ for a standalone or even embedded database. In the past I used Jet a lot but since Microsoft is abandoning it (like some many other things including being successful… πŸ˜‰ ) I started looking for alternatives. Lately I’ve been using SQL Compact a lot. It is actually nice to use and because of it SQL server roots developing for it isn’t that difficult. However, it still has one drawback that most other ‘real’ database systems have – it requires a separate install which must also be maintained separately – think about software and security updates here.

I’ve been working on a genealogical database for an uncle of mine and the current database is still an MDB file. One of the reasons moving away from this format is that Jet is not supported on 64-bit anymore – and Microsoft is not making any effort (nor would I expect it) to port the Jet database drivers to support 64-bit. Then, even the new format for Access requires installing office. This brings me to another reason I want to steer away from installing ‘separate’ things just to support a database – he (uncle) like so many other ‘normal’ computer users have no idea how to manage or maintain a database system especially if things goes wrong (and they have a habit to with normal users using them – I wonder why…). So what could I use to suit these requirements??

In the past I have considered using a plain xml file as a data store but abandoned the idea for various reasons. Things like xml’s ‘bloatness’ or lack of real database features counted against it. Now I find myself again re-looking at this but perhaps with different expectations. I don’t think using an xml file as a general database would be a good idea but for a scenario like mine it might just work – perhaps.

The question is of course how to implement this database idea. An xml file is just that – a plain text file thatΒ  has no functionality by itself. There are existing database systems that are based on xml – see nxd databases. However, none of the well established ones really support .Net as is. On the other side I don’t want to go and develop a whole new database management by myself. Perhaps there is a middle\hybrid way of doing it. From past experience I know that .Net DataSets can persist to an XML file and internally it can be seen as a mini database with support for real data types, indexing, relationships, default values including things like autonumbers etc. Transactionality is not required as the system will be single user, single instance based. Some downsides are that xml is very bloated, you cannot load just part of the data – it is either load everything or nothing and you have to be careful with which encoding you use (because genealogical data usually contain non-ascii characters πŸ™‚ ).

Thus, I’m in the process of investigating how feasible it is to use either a plain or typed DataSet as the base of a data layer for an application. The application itself will still use normal ‘domain’ class structures to handle data internally but the data access layer will rather interface with the DataSet. I thought about just using the domain classes and serialization to persists them straight to (xml) file but then simple functionality provided by the DataSet objects would have to be coded manually (and I’m too lazy now or not in tha mood).

So stay tuned while this idea develops.

Windows Mobile 6.5.x , GMail and IMAP broken

If you are one of the ‘lucky’ ones still using a Windows Mobile 6.5 phone and reading your gmail using the standard imap interface (the default way) then your phone is screwed. Apparently Google made some change on their side that does not play nice with the imap client software on these devices. The result is that the tmail.exe process goes haywire and runs at 100% (or close) of CPU time. This has the effect that the device is first, extremely slow, the battery drains in something like just an hour or two and your gmail is not actually working anymore.

Early suggestions to temporarily fix this was to switch the receiving server (protocol) from imap.google.com to pop.google.com but even this didn’t help me. Even setting the refresh polling to manually cause the process to spike which cause the same problem. So for now I had to totally remove the gmail account just to get the rest of the phone to work normally.

Mode details here.

Hopefully they will fix it soon!

[Update: I’m glad to report it looks like they solve the problem!]

The future and Microsoft

The following is purely an opinion so don’t shoot or quote me – since my opinion apparently doesn’t matter much to most people anyway.

Reading an article about the financial states of Microsoft compared to Apple and from what I’ve seen and experiences in the last couple of years it seems to me things are not going so good for them lately. Sure, most companies, even big ones have their ups and downs but once a trend begins it is hard for any company to turn it around – especially for a big company. Windows and Office traditionally have been the big cash cows for them but that market is not going to last forever – or it will morph into other more diverse markets. There was a time MS was at the leading edge (even cutting) at some time but lately they are only playing catch-up mostly. Perhaps the whole ‘security’ fiasco that plagued the early Windows XP years distracted them from real innovation – or the stupid anti-trust case in which they actually were ‘wrong’…

The only ‘cool’ thing to come out of MS recently is Kinect and that has a very small and ‘ninch’ market – in a market already controlled by competitors. They don’t lead in the market with technology anymore – i.e. with big trendy setting things. Sure, they have a cool research lab that comes up with things that sounds very nice but rarely do these things get to an actual market (thinking about things like the optical table here). Perhaps it is the perception of the ‘people’ that MS isn’t producing anything cool anymore – but seeing Apple is the same or even bigger age than them and doing very well with keeping being ‘in’ that is not an excuse. As far as Kinect goes, they launched it into a small already saturated market instead of the ‘big’ market that they already control (PC market). What if they rather launched it into the PC gaming market – a market that was once much bigger but then they went and neglect that too… I can’t help thinking about some military wisdom here – if you choose to fight an opponent do it in an area that you control – not somewhere where ‘he’ has the upper hand. Sure, in the movies the heros can take on the bad guys at the things they are best at and win, but this is real life! Is MS living in some kind of fairy tail world or something πŸ˜‰

Then there is the whole ‘thing’ around the leader of the MS pack. I’m sure Mr Balmer is good at what he does (marketing) – but being CEO of a big software company wasn’t it. I’m not saying he is some idiot that does not have a clue, rather that his skills would suit another role better. His notorious outbursts with chairs and so on isn’t exactly helping making the company’s image better. Mr Gates wasn’t perfect but he notoriously and ferociously pursued things that he set his mind to – even to the point of hurting his friends/partners apparently. Yes, times were a bit different then – a smaller less mature market and so on, but back then MS was kicking butt!

Sometimes MS is its own worst enemy as well. The whole backwards compatibility thing was/is a big innovation killer. Apple seems to have a different strategy which is working for them. The issue should not be functionality tied to software/OS versions – in other words, software may be compatible with only one specific OS but if you want to do the same kind of thing on the next version of the OS the new software must have the same or better functionality even though it may not be compatible with the old OS. Yes, in theory it sounds easy but in practice its not. Perhaps they should rewrite Windows/Office keeping only the knowledge and list of requirements of the previous version. It could shut up the security freaks that keeps on complaining Windows is ‘insecure’. But, ‘us’ developers would like to shoot them for breaking all our programs πŸ˜‰ Just an idea…

If I could add my 2c to suggest something they should try – do new and exciting things in the market that you are already good at and then perhaps even steer it in a new and exciting direction! Think along the lines of new exciting tools/toys for the PC gaming world.

So am I right or am I right? (or wrong at being wrong… πŸ˜‰ )

Something cool about computers

The following is not really a technical post but some general comment and even amazement about a tool that is not exactly new – but I recently discovered the power of it.

I’ve knew about Google’s Picasa software for some time and also made use of it occasionally – the red-eye reduction tool is really good compare to some other free tools. Today I launched the tool again to quickly use a little feature or two but was prompted a new version is available. So I thought, awh well let it update itself while I do something else. After the update it started furiously to scan new picture folders that was added since I last ran the application – which could have been months ago for all I know. Anyway, I noticed something I did not see or was not aware of before. The ‘People’ tab on the left started showing faces of ‘unknown’ people. So I started playing with it adding a few names of me and my family. Next thing this thing starts added dozens/hundreds of pictures to the list where my and my family’s happen to be on the pictures.

Cool I thought, lets try to see how accurate it really is! Added some more names and checked the existing names for the photos it added automatically. Wow, it works really well. Sure it made mistakes – people that might look alike or the quality of the picture was bad to begin with – but overall it is working very well. Of course, the more pictures of a person you have the easier it is for the software to recognize someone. It did not take too long to get lost in the process and have hundreds or thousands of photos ‘tagged’ – and I have many thousands of photos I have taken over the last couple of years.

The point of this all? Even though I’m working each day with technology sometimes something simple like this can still amaze me. Sometimes we are so busy working with computers that we almost forget what they really can/should do for us. Often we (especially in IT) work ‘for’ the computer instead of it doing some work for us! This tool is one of those rare cases where a computer can do something amazing for me/us! Don’t forget how hard it is sometimes for us people to recognize faces – and we’re suppose to be good at it.

Now, it someone can just figure out how to get computers to properly respond to voice input – like KITT use to do, we can get rid of all these stupid keyboard and mice thingy’s πŸ˜‰ Awh well, may by next decade…