Is Linux ready for me?
Is Linux ready for me?
In parallel to my efforts to completely switch to Vista in my office, I decided to
check out on the progress of Linux. I was curious can I do all my daily job under Linix, so I installed the latest Ubuntu alpha in parallel to my Vista. I planned to spend roughly half my working day in Vista and the other half in Ubuntu. For the purpose I used my company Fujitsu-Siemens T4210 tablet PC, Vista business edition and Ubuntu 7.04.
Installation
Ubuntu installation was a breeze, but I had to put in additional 2 hours of
effort (reading forums mainly) to get the tablet and tablet buttons working. The Ubuntu forums are really helpful, and it is quick and easy to find exact steps to get your hardware working. I never managed to get the built-in microphone working, though.
Wireless networking is greatly improved in the latest Ubuntu. Much more stuff works out-of-the-box. Overall no problems here.
Doing work stuff
I started doing what I do normally, and overall I was able to to most of my work
under Linux. This included:
- E-mail: no problem connecting to the company exchange server, delivering additional
POP3 boxes to the exchange store. No problems here at all. - Source control: we are very lucky to be using Subversion, so everything was pretty
smooth here - Bug database: Our bug-base as any modern one has cool web interface, so this was no
different than Vista - Merging: Meld is a pretty good open-source 3-way merge tool. While not as good as
the Windows-one, it was sufficient - Document processing: OpenOffice was perfect for my humble Word/Excel/Powerpoing needs, the compatibility with MS is not great, but bearable. We keep documentation in a wiki anyway, so there are not a lot of documents around
- Instant messaging: Skype, ICQ run with no problems.
- Running Virtual Machines: Here Linux really shines. I don’t install any development tools/sdks on my machine, but rather setup a virtual
development machines for different products/setups. VMWare for Linux is great, install is very straightforward and simple. But why it is times better than Windows you ask? Because Ubuntu eats up much less memory than the Vista monstrosity, and VM run times faster.
But I also found out I had to re-boot to Vista for some tasks. What I did not manage to do under my Linux:
- Doing Skype conferences - that was because I could not get the built-in microphone to run. Other then that the Linux Skype version is simply great.
- Project planning - Microsoft Project has no equivalent under Linux that comes even close. I gave at least 6 open-source alternatives a try and none of them had more then 20% of the MS Project features
- UI Prototyping - Visio and Photoshops’s closes alternatives - Dia and Gimp were
far away from the functionality and ease-of-use to the Windows versions - WebEx conferences - No WebEx for Linux…
Doing fun stuff
- Music and sound - Due to its lack of a singe, standard sound HAL, anything sound-related is a pain in the ass. Yes, I can listen to my mp3 and hear the sound of flash applets, but not together, unless I spend hours of configuring. No thanks, was about to do fun stuff, and configuring 100 sound-using applications to work together is no fun in my book.
- Ur-Quan Masters - I love this open-source game, and being under Linux I decided
it will run better than the Windows build. I was very wrong. Due to the lack of
a single, standard graphics HAL - it wouldn’t run under my Ubuntu. It behaved like
an old DOS game that was run on EGA using CGA settings. Pathetic. The Windows version runs perfect on any XP/Vista I ever tried.
The conclusion
Linux has improved greatly for the last year. If I was writing this article for Ubuntu 5.x, it would have been much, much worse. It is now almost suited for work stuff. If I had found a reasonable Project, Visio and Photoshop alternatives - I would have switched, since overall I started to like Ubuntu very much.
For the fun part - its greatest strength (the huge freedom and choice) is its biggest
curse. Until there are world-wide Linux standard HALs for hardware accelerated video
and modern 3d sound, Linux is totally not ready for the fun part. And it is my favorite
part….
Post Linx
Permalink | Trackback |
|
Print This Page | Leave a Comment
Refactor-able code
Filed Under Software
I have been thinking lately what is the best way to Stop over-engineering and still not fall victim of duplicate code (or even worse - very similar code).
At first glance, the approach of Test-first programming and refactoring seems to be the perfect remedy to over-engineering. What it basically says is:
- Keep the code as simple as possible
- If you are about to use duplicate or similar code - re-factor at all costs
This guarantees you that the code will be right-engineered. Not over-engineered (unnecessary complexity), nor under-engineered (duplicate, similar code all over).
The problem with that approach is that it does not work. It does not work because the “at all costs” rule above is frequently overruled by non-engineering reasons. A typical example will be when you decide not to re-factor to fit in the latest feature since you are too close to a release and you don’t want to introduce new bugs or void the testing already done.
Then you fall into the “I will patch it now for the release and re-factor later” down-spiral. So if you are stubborn on the “at all costs” rule, you will not be able to make your releases, and if you are not you will end up with an under-engineered code-base.
The root of the problem is that refactoring takes time and brings instability to the system. And to me there is no reason for that. We should be able to write code that is not complex at that moment, but is refactor-able (or refactor-friendly). Such refactor-able code will be easy and clear to refactor if necessary, but without doing it in advance. We will save time from the development (as compared to over-engineering it), but we will still be able to follow the “at all costs” rule, since refactoring will be easy.
My goal is to come up with a definition and how-to for refactor-able code. I am posting this much more as a basis of discussion and ideas, rather than as something carved in stone.
Definition: refactor-able code - code that is easy and risk-free to refactor
How to do it:
There is just one simple rule - Over-engineer in your head, do it simple. What I mean is to keep in your head a vision of how would you over-engineer it if you had all the time in the world. Then write the code simple, preparing it to match the vision in your head.
Since this is a really vague how-to, I will try to list cases in which you can substitute the urge to over-engineer something with much simpler preparations for that. Following is a list of examples
| If I was over-engineering I would… | Instead I will… |
| Split this into two modules and use callbacks to communicate | Keep the two modules together, but keep the would-be-callbacks as separate functions. |
| Make a base class for the generic part and inherit it for this special case | Do one class, keeping the “generic” methods together and don’t allow a lot of special-case code to go into the generic methods |
Post Linx
Permalink | Trackback |
|
Print This Page | Leave a Comment
Repair dynamic disks that go foreign
How to repair dynamic disks that go foreign or will not reactivate
Sometimes when frequently switching dynamic disks among machines, moving parts of the disks of a group amongst machines, or doing something not very simple sometimes the LDM (Logical Disk Manager) will break and some or all of the disks will go foreign or missing. The LDM is the table that contains information about all disks layout - partitions, stripes, etc.
In many cases you will be able to get to your volumes using “Import foreign disks” or “Reactivate disk“. Sadly sometimes the Windows Logical Disk Manager goes berserk and fails with “Disk group has no configuration copies” or some other cryptic error.
Consider you have done everything you thought of, and you don’t have a backup of your LDM created with Tiger Technology’s Dynamic Disk Optimizer tool (which would have saved you). Then there is the last measure - re-building your dynamic disk configuration manually. The rest of this post will explain how do do it.
I assume you:
- Remember by hard the layout - partition sizes, striping, spanning, etc. If you are not 100% certain do not proceed - you will DESTROY your data.
- The you are at least a developer or sys admin. I will be talking in disk sectors, hex, cylinders and complex abbreviations like NTFS, NTLDR.
- You are familiar with working with a disk Hex editor (like WinHex). If you don’t feel crafty with this - do not read further - ask for help
- Understand this is just information I publish. Should you decide to rebuild your dynamic disks following this advise, and you lose your data as a result, the responsibility is yours.
Lets use a stripe of two disks as an example. It won’t import. It looks like this in disk management:

Step 1: First we have to backup the first 4096 bytes of your NTFS. Use a hex editor (like WinHex) to find the NTFS (it should be on disk 1). Depending on weather the disk is MBR, GPT, and how you partitioned the NTFS(es) might be in different places. Look for the string NTFS with the hex editor, and when you find it - check if it matches this picture:

Then from the start of the NTFS sector, write 4096 bytes to a file somewhere. This is the important info to rebuild the volume. If you don’t successfully backup that, and continue - the data is LOST. Also remember disk number and offset where you took the backups from.
You have to do this step for each volume (not disk). You should end up with as many NTFS backup files as many volumes you had. If you had partitions in the middle of the disk - it might be tricky to find all NTFS headers.
Step 2: Convert the disks to basic

Step 3: Convert back to dynamic

Step 4: Create your volumes again as they were. EXACTLY the same. When Windows ask to format the new volume DO NOT ALLOW.

Step 5: Write back all the NTFS headers you backed up in Step 1 (you remembered disk offsets and numbers as I told you right? If not - search for the NTLDR signature as screen on the WinHex screen shot above - it is on the next sector as you can see from the screen shot, and it will be there).
Step 6: Try to mount/access the volume. You should see your data :)
Post Linx
Permalink | Trackback |
|
Print This Page | 1 Comment
New version of Magic Price
Filed Under Games
Abugames changed their search result layout recently, so I had to update the Magic Price software sync logic. Also, the “specials” feature is gone, since there are no more special offers at abugames.
A few notes for old users:
- Erase your CARDS.DAT file (sorry for all the custom prices you had, but abugames changed the inventory IDs for cards)
- Replace your current “magicprice.ini” with the one in the ZIP file - they changed edition IDs as well
You can grab the new version here.
Post Linx
Permalink | Trackback |
|
Print This Page | 2 Comments

























