Thursday, August 20, 2009
IPHA - An Open Source Framework for Development of Strategy Games based on Microsoft Technology
GRIN Publishing is a nice place where you can submit your written work and let it spread, without your intervention, over the various online resources (such as Google Books).
It's a good way to advertise yourself and get some dividend for the work, instead of letting it just lay in the drawer for good.
So, I published the project I wrote during my studies.
It calls "IPHA - An Open Source Framework for Development of Strategy Games based on Microsoft Technology" and basically contains some interesting information regard the thoughts and possibilities of developing computer-based strategy game.
Take a look at Google Books
OR
Order it from GRIN (and maybe enrich my bank account a little...)
Thursday, March 05, 2009
The reasons for the economic slump: My version
Well, it was a result of a big bang...When the economic world is full with seething explosive agendas, it is necessary that only one of the agendas will crash to cause the grandiose Tower of Babel to fall down.
And it's true: The sick agenda that light the explosive barrel was the subprime mortgage financial crisis. Sir, you can't expect anything else to happen, and if you do - you just turned a blind eye from the reality, shamelessly.
I'm not a professionally educated economist, but (at least) in one thing I good at, and that is the objectively observing of reality and concluding obvious things that prejudice professionalists are not thinking about at all.
Ladies and gentlemen, please fasten your seatbelts. The facts are these:
The subprime mortgage financial crisis
OR: "RING RING... Hello! I would like to speak with the manager of the bank. (interval) Good morning Mr. Jackson! Listen, I just bought a new house in Miami and I need some cash... ah... no no, don't you worry about my negative current! Hey, I'm about to get a fat heritage in the next six months so there's not a problem.... Yeah sure sure, you can count on me about it... OK... aha aha, so you agree to lend me 300K? Great! Thank you very much Mr. Jackson. Have a nice day!"The collapse of the American car industry
OR: That's what happened when your private car's engine is 5000cc. The gas is cheap you say? Hah! maybe in Texas, not in Tel Aviv or Paris.

Alcoholic legend
OR: That's what happened when you don't have the shame to ask 2.5 million pounds for your 2.5 rooms, ruined place, and just because it is located in London!
Retailers of consumer electronics are closing
OR: How many times should I tell you that? I don't need another 25" LCD television in my home!
Software companies are shutting down
OR: Reinventing the wheel and call it "a new product" just becuase it has a smoother GUI won't cause me to replace my steady, working system. And NO! I don't want to get your new ERP system in half price.
Hardware companies are shutting down
OR: Why do I need to replace my dual core processor to a quad-core processor if every software is running in the speed of sound? It will run Crysis much faster you say? But I'm 60 years old for god sake! Why would Crysis interests me at all if I don't even know how to do Average in Excel???
Mobile phones manufacturer are shutting down
OR: I'm... I'm really confused now. Tell me again what's the difference between 3.5G cellular and 4G? What else, except of stereo MP3 player, 2MP camera, 1000 different applications, hair drier, frying pan and stapler my mobile phone should be able to do? Let me stay with my 3G phone and watch high quality (NOT) YouTube video in the terribly small screen. That's all I need till the parents home.

It's nice. Really. It's just I don't really need this
OR: Get a brand new Airbus A340-600? Are you joking? I already have five A340-400 in my fleet! You suggesting A380? Hmmm... intersting, but for the transatlantic routes the A340 is truely enough. By the way, when will you start developing supersonic, CHEAP, airliners? We're at 2009 and the Wright brothers are just a distant memory now.
Airlines are collapsing
OR: How it comes that we still flying these non-economy airliners? Are we captives of the airliners industry and OPEC? (answer: yes, but shhh.....)

It's not the size that matters
The stock exchange is not a safe place anymore
OR: Day traders? Day troublers maybe! And left his words hanging.
And the list continues... but what the root for all of these?
It will be a shock to hear that, but the capitalism as we knew it is no longer relevant. In the last 30 years the world was developed too fast (exponentially, it is claimed) in all subjects: from construction to nano-technology. The growth of the worldwide population was not coherent with the supply and demand model of the capitalistic economy. The industry is producing too much supply for too small demand, and even though the prices for the goods are relatively low - it doesn't trigger the public to make a purchase. The supply and demand balance was out of control, becuase there's no real control in the capitalistic agenda. Theoretically you're allowed to produce whatever you want as long as you have the money to do it.
That's leads us to another slap in the face: The lack of regulations is a terminal disease. As an entrepreneur, when you don't have enough money to hold your business by self revenues, you know you can always use the famous crack: the venture capital. This financial invention, the tricky endless pool of funds, is the major factor to inflation. As long as the business does not live by itself, it is considered as a leech to the financial world, and the venture capitals, with thier flighty profligacy are only encouraging it!
True, in order to build up something new, moreover when it is a pioneering one, you need to put some risk. But the problems start when you put too much risk. In other words - there's no regulation. And where there's no regulations, people are playing with fire and for the big bang mentioned in the begining of the post, a small uncontrolled fire is enough to trigger it and leads us to the uncomfortable situation that we're face with these days.
Altough I defamed the traditional capitalism, please don't consider me as a communist. My world-view is that pure socialism unequivocally leads to a sad world settled by sad and embittered people. Fact: Every man in this planet, from china to the USA wants his space for creativity and self-fulfillment. The development of the society and quality of life is a direct derivatives of that fact, and in practice we where witness to the flourishing of the western bloc upon the eastern bloc for most of the time. The major problem with the communist regime is that only small group of people are enjoying the freedom of creative work and suitable pay back, and that is the over-powered government.

Is the "open source" is a camouflaged socialistic attitude?
So, the world is going to a big change, and it is inevitable. The big question is: Do we need a third world war to complete the transit or can we do it peaceably?
Monday, July 14, 2008
WCF Insights, OR: Playing Hide and Seek with it
I'm writing this post about 5 minutes after I succeeded solving my 3-days-going-round-in-circles code problem.Yeah... it's those days you want to forget and repress. You feel lost, you feel confused, you've tried every code change, every trick. You drank tons of coffee and went back and forth. You Googled and Yahooed and Altavistad everywhere. Nada. As the old saying: "A prophet is not without honor save in his own country".
Finally (sooner or later), you're solving the problem and you immediately think about three things:
- "I'm so so smart that I managed to solve this problem!"
- "Damn! it was so easy and so around the corner that it make me sick!"
- "I'm gonna kill who created this API / framework / service. Bring his head to me now!"
Problem with passing large and complex objects using WCF
This is a common one with many reference in the serach sites. You may want to pass large DataTables or complex object with many nested lists you created. If you encountered an exception in the client side it might be caused by several reasons. Check this list to see if you configured everything correctly:
- Too short timeout confiugration
- Too small received massage size
- Too small buffer size
- Too small buffer pool size
- Too small value for the "maxItemsInObjectGraph"
Here is the WCF configuration schema as a reference. You should be aware that giving too high values in the configuration section, may lead to DoS (Denial of Service attack). So if you care for your server, give it reasonable values according to real size estimations you have. If you don't have a clue about size estimations, tune it by starting with relatively small values and continue increasing it until everything runs ok.
If the communication is duplex (i.e., the server and client both send and receives data), you should set this configuration in both sides.
WCF service started it's job, but the client crashes or stuck
- Unsupported types: Make sure that all data members in your data contract objects are serializable and has no known problems in the serialization period. Specifically in my code, there was a problem using DateTime type. Several websites support this phenomenon (such as this one) and suggests to use the OffsetDateTime instead. The OffsetDateTime type has also the advantage of controlling time zones, which is a very important issue in distributed, service-based, systems. Here is the MSDN reference for it.
- Unhandled server-side exceptions: You should know that that the server may encounter with exceptions it may suppress, and thus - not letting the service operation to be completed. Thus, the client is unaware of the reason why nothing happens or crashes. Handling this situation requires the usage of the "FaultContractAttribute". See more details about it, and how to use this attribute, here.
- Use a suitable binding method for your purposes: There is a big difference in the funcionality among the built-in binding types that WCF supply. Queued, HTML based, TCP based, secured or not, reliable or not, duplex communication or not. This article will help you decide. Make sure to configure the client endpoint and the service sections with matching definitions (for example, don't mess wsHttpBinding with netTcpBinding).
WCF service methods are not responding during asynchronous calls
If you're using asynchronous calls with the WCF service, and it "just doesn't work", it might be caused by other problems which are not part of the asynchronous game. If you isolated the problem and sure it is an async problem, check out that:
- Your proxy class code is synchronized with the one in the server. Sometimes you just forget to recreate the proxy class after performing changes in the server code.
- You didn't miss the "IsAsync=true" attibute of the OperationContract in the relevant method.
- You're using safe operations (using locks) when multithreaded operations are involved.
- You're waiting for the async operation to complete (like using "WaitOne" method in the IAsynchResult model), and the calling thread not "running away".
You should know that WCF has two main attitudes to manage asynchronous calls. Make sure you follow it's rules:
- The tranditional way. Event based or IAsynchResult model. Take a look in Dan Rigsby's wonderful series of posts, here.
- Using WCF callback interface. CallbackContract attribute is used here to determine who is the interface which is managed to perform the callback operations. Take a look in idunno.org website, here.
That's it for now. If you have more insights and tips to share, a reply would be grateful for everyone.
Have a nice WCF experiments!
Sunday, June 01, 2008
Tipeysh! - Add-in that helps you creating C/C++ header files on a single click
Saturday, February 16, 2008
Windows Vista - an unripe fruit?

OK, let's start from the end and write down the bottom line:
I'm sure it is.
But, please read the next anyway. It's a nice story:
The Vitruvian Man: Old GUI masterpiece.
Genesis
My story with Windows Vista starts somewhere in the mid. of 2006. During one of Microsoft's conventions we received a green DVD copy of the Windows Vista, labled "Windows Vista Beta 2 x64". "Terrific!" I thought. "No I'll have the chance to examing the new 64Bit based HP laptop I just bought!". After all, as many people said, the 64Bit world is much more faster and enjoyable. I want to enjoy!
So I installed the DVD in my computer. The installation was fast like the speed of light and easy like eating hamburger after a fast. Really, I think I took maybe 20 seconds from the point I turned on the computer to the desktop to appear. And it wasn't "such" desktop. It was a super desktop - shining, glass-like, bright. The dream of every user. Yes, even linux users mumbled some words in praise of the exciting new UI.
Looking at the device manager, I've noticed that most of the devices wasn't installed and wasn't recognized as the manufacturers didn't create any driver that supports Vista. Legitimate. It's only a Beta version and nobody knows how to program drivers to the rich world of computer devices.
Satisfied from the what I saw, with due respect I formatted the computer again and installed the well-known Windows XP.

The Vista Age
January 30, 2007. The worldwide public release of Windows Vista. There you go! Microsoft has finally finished the grandiose and well-spoken development of the new exciting operating system in the neighborhood. Time to see this in live. In a golden opportunity I had the chance to buy the Ultimate version on a very comfortable price.
Jubilantly I installed it on my computer and was very pleased to find that it recognized and installed almost all the devices. Except of several sepcific drivers which I found in HP's website - it was just ok. One problem I've encountered was that it could not installed the Lexmark P6250 printer (which I bought only half a year before), exited with a weird error message. Lexmark's support asked me to donwload and install some thin driver they developed for the P6250 to work with Vista, but it didn't do the job. The same error message appeared and I was still printerless.
Lex-shit
Three denounces for the Lexmark company:
- Your support asnwers are too robotic. It is so clear that you try to satisfy the clients with pre-defined answer - for questions he didn't ask at all! You repeat several "solution" suggestions without even know your chasing after the tail of an empty help. If you can't solve a problem - just say it immediatley. But please, don't exhaust your customers with redundant email ping-pong. I don't need a psychologist, I need an technical person.
- You have a too short forward compatibility for your printers. In private with the P6250 model which was bought only half a year beofre launching Vista! You also created an unworking driver for Vista while declaring it is working. I'm pretty sure you didn't check it at all.
- Althogh it is a Windows Vista article, I would like to say that the fact you don't have driver support for linux is just a shame. While other printer companies does support linux - you just ignore this like it was an air. And no, answers like "try to search for a third party solutions" is not a professional answer.
Next time I won't buy Lexmark!

Lexmark P6250: Not supported in Windows Vista!
First marks
And continuing the story. After several days of usage, I start to notice that the Vista acts strangely.
Sometimes it was unable to complete a simple operation of copying files from folder to folder, it was stuck without noticeable reason - then jumping the "Would you like to find a solution for the problem?" form.
In other occasions I was unable to "kill" processes!
And no, it is not a virus nor spyware. A little respect please... I have a maintained computer with all the latest windows updates and such reason is even somethig you don't say loudly...
After it was just unbearable, I downgraded to XP. Home sweet home.
The last straw
Two weeks ago, after discovering that my HD is too small for doing cool things, I decided to buy an external HD. Searching here and there I found the "Western Digital My Book Pro 500GB" as a suitable accessory. To mark this happy event I thought about something special:
Re-install Windows Vista.
In fact there were two "real" reasons to do so:
- The first is that a long time passed since my last bad experience with Vista and I thoght that maybe Microsoft stabilized it meanwhile.
- The second is that I started programming with Microsoft's new WPF and WCF .NET technology and I wanted to maximize the user experience. After all, Vista is native for that technology.
The Lexmark P6250 printer still wasn't working. "Leave it" I said to myself. "I will anyway buy a new one shortly. Not from Lexmark".
Then I connected the external HD...
I will make a long story short: The HD did A LOT of problems. Starting from freezing after a short period (which cause the entire system to freeze) to be unrecognized by several applications.
After contacting with all possible Western Digital support centers in the world, and almost reaching the president of WD, blaming that the HD is sucks and doesn't work properly and I want my money back, a little thought raised in my mind: "Could it be Vista? Naaaa, I can't blame Vista for everything. But, who knows... lets check it out.".

Western Digital My Book Pro 500GB:
Not fully supported in Windows Vista!
So once again I downgraded to XP.
Surprisingly, the external HD was working like new (well, IT IS new!). Doing all the required job perfectly. Didn't hang, didn't freeze. Worked around the clock without any problem!
Conclusion
What can I say. I truely wanted to support Vista, to be the guy that say to everyone "Hey, you're just prejudicing Vista and the true is that it's a great operating system!"
But I can't. Vista is an unripe fruit.
Smart man he was, the one who said before: "lets wait for the Service Pack 2 of Vista. Only after it will be released it'll be safe enough to be used.".
And I would say: "let's wait for SP3 of Vista. After all, Windows XP, wihout any Service Pack installed, was much proper than Vista in it's parallel stage".
Wait and see, but don't install Vista!
Saturday, June 02, 2007
What to do when the computer's CD/DVD doesn't play smoothly

"...Su____mmon up yo__ur gho___sts fo _r me / Rest you___r tir_ed thou__ghts up on my hands / Step inside th__is sacred place / Wh__en all your d__reams seem bro__ken...".
It is that song that sounds broken, damn it!
Therefor, I decided to take a long breath and fix this thing once and for all. So I thought for the most possible reasons:
- The DVD's reading ocular is dirty
- The CD is scratched
- There's some copyright feature that causes this
- Codecs conflict cause a distort playback
- "Nero" become crazy
- BIOS problem
- Driver problem
Instantly I rejected the first three options, since I already cleaned up the reading ocular, the CD is as good as new and it is completely genuine and legal.
So for the Codecs issue, I started to isolate each codec by uninstalling one by one, but it didn't solve the problem.
About "Nero": It wasn't the only CD burn software that has the problem of slow burning operations, every software acted the same.
Next, I searched for an update to my laptop's BIOS. I seached for a compatible BIOS for the HP Pavilion dv5000 series, and I found it here (F.54 of Phoenix Technologies). After installing the update (I was surprised it went very fast and without any problem...) and restarting, I found it didn't solve the problem. Dirty.
Next is driver: Well, I searched the web for a drvier update, but I already had the latest version.
Ok, so here is what DID solve the problem:
It is the IDE ATA/ATAPI controller. Each IDE device (for example, a CD drive or a hard drive) can work under Windows in two modes. The first is called "PIO" (Programmed Input/Output. read more here) and second is called "DMA" or "UDMA" (Direct Memory Access. read more here).
To make a long story short, The PIO is the older technology for data transfer from a hardware to the physical memory while the DMA and UDMA are newer and much faster methods to do the same operation.
So from some reason, the IDE channel for the CD/DVD drive was set to work in PIO mode. Also, I couldn't change it to UDMA. So what I did is:
- Go to the Device Manager
- Under "IDE ATA/ATAPI Controllers", right click on "Standard Dual Channel PCI IDE Controller" and then "Uninstall".
- The Windows asked me to restart
- After the restart, a "new hardware" was discovered and installed automatically.
And like a magic, all IDE channels worked on a UDMA mode.
Everything is now working properly and I can hear "Octavarium" smoothly!
Thursday, May 24, 2007
How to do it in Flight Simulator: The SimHow.com way
Fanatics is the most precise word I guess.
Thus, it presents an arranged downloadable how-to manuals such as
- How to Build Hardware for FS
- How to perform professional repaints
- How to stay align with the runway
- How to fly online in a virtual airline
- How to fly the 737
And more (currently over 50 manuals).
All of the manuals were created and contributed by personal users. You should register for free to be able to download the various stuff.
The more the merrier!
