and has 1 comment
A while ago I bought this LaCie 500Gb external hard drive and I was rather satisfied with it. With the occasion of the horrible Easter holidays I finally turned off my computer (after weeks of it working continuously). So imagine my dismay when I came back home, turned the LaCie on, then the computer and all I had to show for it was an USB mass storage controller error in the Hardware Manager.

After trying a few things (and noticing that the hard drive would not actually turn on, instead a tick-tock sound was heard from inside) I decided to open up the drive box, proudly written on it "Designed by F. A. Porsche". Well, fuck you, Porsche! I had to almost destroy the box to open it, then the insides had so many "one installation, no after service" components that I felt like walking on broken glass.

Anyway, inside the LaCie there is a small USB controller and an SATA Seagate Barracuda 7200.10 hard drive. I installed the hard drive as an internal drive and... nothing! Windows XP blue screen 0x0000007B. The computer wouldn't even recognize the drive in the boot up screen.

Well, after looking for drivers and stuff like that, I was resolved that the hard drive was defective and all my music, movies and books were lost. But shutting the computer down I noticed that the drive was actually spinning in its internal setup configuration. So, desperately, I tried to use the power from the internal computer power source and the rest of the drive in its USB setup... and IT WORKED!

Now I am going to buy another drive and get all data from this one, but still, if you are desperate that your USB hard drive is lost, try to open it up and power the internal drive with a normal computer power chord.

As for why the internal drive did not work directly on the computer? I have almost no idea. The Seagate site says clearly that SATA drives do not require drivers, but the various SATA controllers do! Since I already have a SATA internal drive, I think that that is not the issue. Rather, the people at LaCie used another drive firmware! The Seagate drive also provides with some downloadable firmware so it is clearly possible. As a completely desperate option to recover your lost data, I guess trying to rewrite the hard drive firmware could work, but I don't recommend it and I wonder how it is possible, considering it wouldn't allow me to boot Windows.

I hope this helps somebody. And Happy Easter everybody!

Update September 2012: after three years and a half, the drive (powered by both USB and internal computer power) started to develop bad sectors. It still works, mind you, I just removed it because I didn't need it as much. Thus ends the saga of the mutant harddrive in the computer that never sleeps and never dies [creepy music in the background] :)

and has 0 comments
While working on RegexConverter I've started learning things about XML. I disliked it before, but now... I loathe it completely. It feels like the XML people are from another planet and I have to twist my brain at straight angles just to understand what they meant.

One of the problems I met was "how to declare in an XML schema a unique constraint/index on the entire document when there are nested elements of the same type". In other words, something like this:
<regex>
<group index="1">
<group index="2">
</group>
<group index="3">
</group>
</group>


Bottom line:
  1. Use the declared namespace
  2. Declare the index in the root element
  3. Use the name of the nested element (in my case group) in the selector
  4. Use the one or more levels deep selector (.//)
  5. Use the declared namespace AGAIN.
.

Concrete example:
<xs:element name="regex" type="regexType">
<xs:unique name="uniqueIndex">
<xs:selector xpath="mstns:group|.//mstns:group"></xs:selector>
<xs:field xpath="@index"></xs:field>
</xs:unique>
</xs:element>


I tried to solve this for two hours only to find the solution was this idiotic. Neither one of "group","mstns:group","mstns:group|.//group" work. The only one is "mstns:group|.//mstns:group".

Grrrr...

First off, I have to say something about forums: stop copying content from one another, jerks!. I have been trying to find a solution for this problem and I found a zillion forum pages with the same "problems" and the same "solutions" again and again and again!

Much better! Now, I have been trying for an hour to understand why setting customErrors="Off" in the web.config of my ASP.Net application would not work. I tried just about anything, including the bloody forums. customErrors Off did not work!.

In the end I found one little comment for a StackOverflow question: set the retail setting in the machine.config file to "false"!! So, go to %WINDOWS%\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config and set retail to false!. Setting it to true means it will NEVER show you any useful debugging message.

The finale of what seemed to become my favourite sci-fi series ever (at its beginning) left me with a bitter taste in my mouth. Not only it makes no sense, but it is overall incredibly idiotic. If you haven't watched the end of the series, don't read further, because this is the mother of all ranty spoilers ever.

What makes it so emotional for me is not only that I really liked the show, but that this was not a show that was ended because of lack of planning or budget or the economical crisis, so nothing was rushed or changed. This was "meant to happen". And it sucked! Sucked worse that a vampire caught in the event horizon of a black hole that is falling into another black hole!

Not only did it not explain anything in a manner that would make sense to me, but instead it went completely overboard on all the things that I hated in the show. God exists, he somehow planned all this (oh, yeah, real modesty here, mr. Moore!), the model 6 in Gaiuses head was an angel, so was Kara Thrace, in the end they all reach Earth (this Earth) and decide to leave all technology behind (they throw the ships in the sun!!!) in the hope that starting anew would make them "break the cycle" and Hera became the chromosomal mother of all future humans. I guess leaving all that technology behind wasn't a good survival strategy for the rest of the 38000 people left alive, was it?!

If everything was God's plan, then there was no cycle except in its brain!! Forgetting mistakes is NOT a step towards not repeating them. Leaving behind technology is just as stupid! And ending the show with a couple of angels walking on Earth now and making bets on if we repeat the mistakes again or not, with background videos of the latest developments in robotics was.... there is no word in the English language for it. It is dumber than creationist! And the last half of the last episode was all about people saying goodbye to one another then going to live alone (read DIE!!) somewhere!

There is a glimmer of hope left though. The centurions were given their freedom and the last baseship. I will be looking at the sky hoping for them to return, nuke Moore and then air an all Cylon TV show about how they didn't repeat any mistake and just carried on!! Gods, this was frakking retarded!

And, of course, there is one more good thing in the series, and that is the Bear McCreary's remix of Bob Dylan's/Jimmi Hendrix's All Along the Watchtower. I am embedding the video with the cool transition from simple piano to all the instruments. Pretty cool!.

Guess what? F***ing YouTube removed the video because of a copyright infringement. What? One minute and a half of a movie scene? Geez! Couldn't find the same scene, so I am embedding All Along The Watchtower.

[youtube:qMo7WybtTWI]

The sound bit of the scene, sans the scene, can be found here. You can also see the live performance of the song here. You might also want to try Bob Dylan's original song.

Update: check out this Google event with McCreary playing the BSG theme with Raya Yarbrough as the vocalist.

and has 0 comments
This is how Dexter, the animated character in Dexter's Laboratory, begins his days. His enthusiasm for his work is amazing and inspirational, but real people rarely feel this way. Today is one of those great days for me! I woke up late, I took a long shower, I've eaten some good food, I've watched one of my favourite anime shows while getting dressed and I came to work in a beautiful sunny spring morning.

What amazing energy and how great a feeling! I feel I can do anything! Throw your legacy ASP applications at me, make me do stupid changes in even dumber web CRMs, give me the most menial degrading tasks you can think of, I will eat them whole and spit out gold! I am unstoppable!

and has 4 comments
Ok, you first must know that Microsoft added a specific namespace for working with ActiveDirectory in .NET 3.5. It is called System.DirectoryServices.AccountManagement. The principal objects in the Account Management API include computer, group and user objects and it provides a means for applications to extend the object model to include custom schema object types.

Now that this is out of the way, I want to take my simple Authenticate, ListUser and ReadUser methods (working fine with the old DirectoryEntry method) and translate them into this new way of doing things.

I did some code and I got this error message: "80075000". That is the actual error Message property! Even more remarkable, a google for 80075000 resulted in only 246 results!! none of them explaining what I did wrong. Apparently, I had sent a string in the format "LDAP://ComputerName" as the computer name. Maybe it helps someone.

But this didn't solve it. I changed it with just the computer name, with or without a "\\" prefix, and I got a more clear text, but just as vague UnauthorizedAccessException: "General access denied error".

I am still working on it, but damn, how can a programmer not think about the error message he passes to other programmers?!

Ok, made it work, here is the code for the user authentication in an Active Directory domain.
Classic DirectoryEntry:

bool authentic = false;
try
{
var entry = new DirectoryEntry("LDAP://ComputerName",
"Domain\\username", "password");
object nativeObject = entry.NativeObject;
authentic = true;
}
catch (DirectoryServicesCOMException ex){}
return authentic;
As you can see, not the most elegant approach.

The .NET 3.5 way:

using (var context = new PrincipalContext(ContextType.Domain,"ComputerName"))
{
return context.ValidateCredentials("username","password");
}
Much better, isn't it? Pay attention that in the first case you need the domain in the username and in the second you need it not to be part of the username!

There is a third way (System.DirectoryServices.Protocols.LdapConnection), but seems too complicated to address right now.

and has 2 comments
No, I didn't leave my current job. This is more or less a quote from some blog I read. Probably Jean Paul S. Boodhoo, but I couldn't find the reference when I looked for it.

Anyway, the gist of the article was that, even if he did enjoy his position, the guy chose to look further and expand his horizons and that, in the end, made him a better developer and a better person. Is that a general idea? Of course not. I am willing to bet that changing one's job more often leads to bad things than good, but in the end you try a few options and you get to some place you can live with.

And, well, I can't stop thinking about the beginning of my career when, even if I wasn't really doing a lot of programming, I was learning a lot by the simple fact of changing jobs. Usually, the first month is extraordinary as you learn new skills, you get to know new people and new methods of doing new things. After that you "get used" to the job, like a shoe on someone's foot. It can also get smelly pretty fast, as well.

Sure, having a new job every 8 months doesn't sound so good now, but the memory of that "living on the edge" feeling still lingers. And who knows? I may find something worthwhile just by looking over the fence. What do you guys think?

A new (and old) buzzword: to reinvent. It is always a good thing to reinvent yourself, they say, with the effect of relieving boredom and living a "new" life. You may discard bad or useless things in favor of good things. It is also good to reinvent something somebody else did, like a movie. You take the idea, you remove the bad things, you add good things. But, as in the case of the benevolent tyrant, the definition of good and bad is always fuzzy.

Was it good to reinvent BattleStar Galactica? I say YES! It was (and still is, despite screenwriters efforts) the best sci-fi series out there. Of course, that is my opinion. Was it good to reinvent Terminator, incarnated into a teenage girl looking machine? Ahem. But I still watch it. Was it good to reinvent Superman as a troubled teenager? Puh-lease! Come... on! Nah-uh! (See, I address the younger demographic here).

Because, you see, the people that decide what is good and bad in movies are actually the money people. They look at superficial statistics that only show... money! They make abhorent remakes of decent films (like Indiana Jones 4 - The Rape of Indiana) or they turn every hero into man/woman/teenager/animated-character/doll versions that bring nothing new.

In the case of Star Trek, they made the first low budget series than achieved cult level regardless of bad production values and some ridiculous scripts, then they made a sequel (at that time reinvention was not invented yet) where Patrick Stewart redefined the space captain as a cerebral science oriented man, but with lots of guts, then they started the old routine: make the captain black, make him a woman, replace the ship with a station, then with another ship, but in some other place, etc. They even made a prequel, which, for almost a full season, was decent in both interpretation and scenarios. What was missing, of course, was a teenage Star Trek captain. Well, no more!

"Star Trek", the 2009 movie in the making (and no doubt, with a series looming if money are made), features a young Kirk and (what a fallacy) a young Spock! The director is none other than my least favourite person in the world: J.J.Abrams, the maker of such abismal stupidities (but well received by the general audience) like Alias, Lost and Fringe. The writers are Abramses old team, Roberto Orci and Alex Kurtzman, the brilliant creators of such idiocies like Alias, Fringe and Xena/Hercules!

I am trying to keep an open mind here, but I would venture to guess that the new Star Trek will have big booming sounds whenever something strange happends, will be filled with inexplicable things that will never be explained, except maybe in the movie (but I doubt it, they have to plant the hook for a series) and will have people calling the others by name obsessively, regardless if the need for it arises. So, it may be cool, but I expect to be baktag!

and has 1 comment
The problem is that Windows XP only accepts serial-ATA drivers from the floppy diskette. You don't have one. What are you to do?

Google gave me a few ideas, but I had to piece them together. So, here is what you need:
  1. download the SATA drivers for your laptop
  2. download Virtual Floppy Drive by Ken Kato - at this time it is at version 2.1 - if your SATA drivers are in the form of a floppy disk image generator (a single exe that asks for a disk in the floppy drive)
  3. download nLite - at this time 1.4.9.1
  4. get a windows XP installation disk
  5. have a writable CD and a CD writer ready
.

And here is what you do on another computer (one that is working :)) :
  1. (if you already have the SATA driver files, skip this)Go to My Computer, Properties, Hardware, Device Manager and disable your floppy drive, if you have any
  2. (if you already have the SATA driver files, skip this)Install and run Virtual Floppy Drive and create an empty image on A:
  3. (if you already have the SATA driver files, skip this)Run the stupid SATA drivers you downloaded - that only want a diskette to format with their files, they can't simply unzip them somewhere - and you will get the drivers in file form on the virtual diskette
  4. Start nLite and select the Drivers and the Bootable ISO options then Insert multiple drivers and give it the drive A: as a source
  5. Create the ISO image, then write it on a blank CD - writing CDs from images is different from just dragging and dropping files in the CD writer window, BTW


That should do it! Use the newly created CD as the XP installation disk without pressing F6 for loading SCSI drivers.

and has 0 comments
Many a time I find myself looking down on people that are not born and raised in a city. Provincial people that come in the capital to find their fortune are always different and, even if most of the time they are nice, hard working and intelligent, the feeling is there. I try to muffle it down immediately, of course, I am not proud of it, but I've never found a proper explanation for the phenomenon. Not until now, that is.

I believe that people from smaller communities (be it a small town or a small group of people with the same interest - see? I am a provincial too, in some respects) can dream a lot easier. They can compare themselves with their peers and find that they are good at what they do, or that they are original and refreshing. The city folks or the people in large groups, find it harder to be exceptional. Events are not singular, they are many, they become statistics. People are no longer resembling a person they know, but rather an archetype that their brain has compiled from so many similar people. One doesn't think back at their own experiences to solve problems, they Google it.

Back to my feelings of false superiority. It is easy for me to label any person, after meeting so many people. The root of my feelings comes from the fact that those people don't understand how I know things about them or the reason I label them. Most of them don't even realise it, when they spew the same thing other people of their category had, that I've heard it all before, that maybe I've even met some of the people in their genetic neighbourhood so I know not only the upbringing from which they came, but also what they are likely to do. And they usually see my reaction as arrogance and become hostile, just as I could interpret their proud banality as annoying.

I come from Bucharest. It is a capital city, but a small one. A New Yorker, for example, would see me as a provincial fool. Maybe that's why I feel so sick when I see movies like Sex and the City where the rituals there feel more foul than the rites of cannibal savages. But it makes sense. You need a 300$ pillow and a 15000$ hand bag if you want to stand out in a crowd that big. Of course you need to hysterically shout out your feelings (after careful considerating if those feelings are appropriate or not, socially). Everything is directed because everyone has seen it all before!

For me, a society of socially omniscient (and omni-demanding) beings is hell. Mostly because I care not for social etiquette. Etiquette is French for label, by the way. Or maybe, because I know it is a game I can never win, I choose not to play, labeling myself as a tech, a solver and a fixer, not a socially astute decision maker. But how much can I last in this artificial provinciality when the big international firms are flooding the city, coming with more and more absurd demands, like dress codes or (more horrible) mandatory code comments? And, compared with all these young kids, full of energy and knowledge, I may not be such a good a tech anyway.

Did I finally understand why I felt so foolishly superior because I am slowly becoming on of "them"? A provincial? A boring, banal, average person?

and has 0 comments

My computer was never the sanest of them all. Its most peculiar problem was that, after running for a while, you could not reset it. You had to either lower the CPU frequency or shut it down, wait for it to cool down, then start it up. And funnily enough, it did that only when having 512Mb of RAM. With an additional 512Mb chip it did not present this abnormality.

About two weeks ago, it started to show "Write delayed failed" errors during the night, when the only utility running was some file sharing app. I started researching and found that the error itself wasn't indicative of anything! A lot of people had the same problem, but each and one of them for different reasons. It was like an "I am on strike" sign from my computer.

Well, I thought updating drivers for my SATA hard drive may solve the problem. In the same swoop I also updated to the latest NVidia display drivers. Nothing changed. I then looked for an application that tells me what is the temperature of my CPU. I found SpeedFan, which is completely freeware and which I highly recommend, application that indicated a temperature of about 63 Celsius.

I thought it was too much so I've decided to clean up my CPU cooler. Between the cooler fan and the metal radiator there was a 2 mm thick dust cover. No wonder it was so hot. I cleaned everything up and my temperature dropped to about 51C. Glad I'd solved everything I started playing a game. Nothing fancy, not something 3D or anything complicated. The computer suddenly reset itself.

Now that was a complete revolt! Frustrated I started a movie and went to the other room to watch it on my TV. You see, I use this wireless AV connector to transfer the TVout signal from my display adapter to the TV in the other room. I could hear everything, but the screen was blank. What the...?

After hours of trial and error I've reached the conclusion that the newest drivers just couldn't do video overlay on the TV. Also, the fact that I chose 1280x1024 as my monitor resolution and it showed in 640x480 was also from the drivers. Funny enough, when I removed the "clone to TV" option, it worked ok. The solution was to download and install an older NVidia driver, version 91.47. When everything was said and done and I was half in watching the movie, the computer reset itself!

I am now at the stage where I found an overclocking setting on the NVidia drivers and when fiddling with it, I get my computer to reset. It is funny that it does that even if I set a lower clock setting, which was my original intention anyway. I believe that the new drivers (and the new not so new drivers) are making my NVidia FX 5200 card go too fast. It overheats and causes my computer to stop. I can only hope that buying a cooler fan for the video card (it has only a small metal radiator) will solve the problem.

Meanwhile, I have set the Hardware acceleration setting from the 3D Settings menu of Nvidia control panel to Single display performance mode instead of Multiple display performance mode as it was set, since I have only one monitor and a TV clone. I could play that game without a reset, although that is not really indicative of anything yet.

Please, computer, I am sorry! I will never do it again! Please forgive me! Don't act insanely anymore! :(

Update: in the end it was neither the video card nor the processor. It was the SATA RAID drivers!! Updating them was NOT a good idea. I went to the specific site of the motherboard I have and installed some drivers from 2003 and it now works without any glitch.

But how did I realize that was the source? Because in a rare stroke of luck I watched the computer display a blue screen and then resetting itself. In Windows XP, if you go to My Computer - Properties - Advanced - Startup and Recovery you find a System Failure groupbox with a bunch of options. Unchecking the "Automatically restart" box will make the computer display the BSOD and NOT reset, giving you the opportunity to read the error message. In my case it was a viamraid.sys giving the error 0x000000D1: VER_IRQL_NOT_LESS_OR_EQUAL.

Update 2: The problem with Write Delayed Failed was not from the SATA drivers, but from the USB external hard drive. After trying everything I knew and found on Google, I was really pissed off that this still happened, until I ran into an obscure forum where a guy said his problems all went away after changing the physical USB port!! So I moved the actual USB jack and the problem was solved!

Some other explanation I found were about the protocol of sending data packets. First it is sent a small chunk of data then, if everything went ok, the next data chunk is twice as big, so 256kb, 512, 1024, 2048 and so on. Windows has some problems with sending packets bigger then 1024Kb! There is a utility on the net that patches a Windows system file to address the issue. I might have run it, I don't even remember it's name :) I pretty much threw everything at my computer and ran it for a few weeks until I was satisfied that it worked. But do try the USB port change first...

and has 0 comments
A year ago I wrote about being a bicycle rider in Bucharest. I complained then that there are no bike lanes and no one gives a damn about bicycle riders or the very law that should protect them. Things have changed, apparently, and now beautiful bike lanes are criss-crossing Bucharest's sidewalks. But it is all for show and appearance.

First of all, they serve no purpose on the sidewalk. Given the peculiar psychology of the majority of the population when they have to choose between walking on a nicely marked yellow/green stripe and the normal gray sidewalk, they will walk where the nice colors are. Even if they would somehow decide to think a little and ponder on the significance of the big bike signs painted on those lanes, there are children that have no idea what they are doing and could always jump in front of you. Normally, the population of the bike lanes in bucharest is comprised of mothers with babies, lovers holding hands, old ladies and people that just wouldn't give a damn. Very often I see young stylishly dressed women walking right towards my bike, ignoring me completely, expecting me to move aside. Do they even consider the damage that I would do if I'd just decided on a whim NOT to move aside? Not to mention places where there is space only for the bike lane and it would be stupid to expect people not to walk on it. And of course, the cars that park right on the lanes and about nobody does anything.

Second of all, the lanes were built close to autumn last year, a season not favourable to biking. Then, of course, winter came, and the plastic like stripes that mark the lanes were pretty much destroyed. So they had to put them again. However, during the spring they started working on fixing the streets. That meant scraping the asphalt (bike lanes on the street included) and puting it back on. But they did draw the lanes back on. Then they started changing the street border stones, usually placing them idiotically high right on the bike lane. And if it wasn't enough, they started placing all above ground wires under ground. That meant digging narrow, yet deep trenches in the sidewalk, interrupting the lanes from side to side, so that there is no way to go around, and they never filled them up! Basically every one in two bike lanes is now broken by this. And, as this was not enough, more often than not the lane is of worse quality than the rest of the sidewalk.

Therefore I will ignore these lanes completely, except the days when I am really tired and don't trust myself around cars, and risk my life and the paint on the cars around me rather than the lives of the people on the sidewalk. What a sham this all is. The Bucharest European mask is there only for outsiders, NOT for the people living in it.

As I was writing in the previous post, because of that law suit they are in, Google is starting to take measures to protect the copyright of videos on YouTube. The result is that all the blogs and sites that embedded video content that is supposed to be copyrighted now have beautiful flash players with a play button in them, but then the nasty surprise of seeing "video not available" when pressing play. At least display the damn message from the beginning instead of forcing me to play every video on my blog to see if there are still available!

But I did that anyway, for music videos for now, and switched to (currently) unaffected French video content site DailyMotion. Of course, lots of YouTube clones are on the net and even YouTube leecher sites. I mean sites showing a wonderful error when trying to play videos that now are removed from YouTube.

So, please folks, if you find some post with missing videos or pictures or anything wrong, really, please comment on it and I will fix it. Thank you and damn all lawyers to hell!

and has 0 comments
It started with web sites. They would put a small picture in the header of the site that on mouse over would fill the entire page with rubbish. We fixed it, usually, by using some utilities or by changing the ip of the offending ad to some non-sense ip.

Now they used the same ploy for Windows Live Messenger (formerly known as MSN). One could say that Microsoft doesn't need more money, but apparently they do. On YOUR expense! So, how can one get rid of the annoying flash ad at the bottom of MSN? Easy! Follow these steps (tested on version 8.5):
  1. Open folder Program Files\Windows Live\Messenger
  2. Copy file msgsres.dll to msgsres.dll.bak
  3. Find a text or hex editor that does not break a binary file on save (That means NO Notepad or Wordpad). Myself I used the text editor from FAR Manager, but there are tons of good freeware editors online. Just Google it.
  4. Open the msgsres.dll file with the text editor, look for
    <Element Id=Atom(AdBrowserCont) Layout=VerticalFlowLayout(0,0,3,0) Visible=false Padding=Rect(8,2,0,2)>
    and replace one letter from AdBrowserCont. I changed the A to an X, but it doesn't matter. What is important is not to change the length of the file; just replace, do not insert or delete anything.


That is all. The ad container will still appear and show the Windows Live Messenger window, but no ad will be loaded.

Of course, this is the do-it-yourself version. There is an utility that is largely recommended on the web to fix MSN, Windows Live Messenger and Yahoo Messenger ad issues, and that is A-patch, but I haven't tested it yet.

and has 0 comments
This is a little YouTube video that shows a photoshoot of Angelina Jolie's when she was a teen. As you will see, she is a lovely looking girl, but that is not the reason I am posting this in my blog. The reason is the feeling that I am having watching this: dread. Here is a 16 years old girl, faking all the emotions in all the pictures that are made of her, with an ice cool professionalism, chewing gum when the film is being changed in the camera. You can imagine what kind of pictures will result from this shoot, when all of this is probably filmed in a small humid room with people watching TV at its more stupidest. Can you imagine trying to concentrate with that noise around? If you ever thought Angelina got to where she is because of her looks only, think again. This little human robot has good programming.


Angelina Jolie - Bikini modeling from 1992 (Photoshoot)