Thursday, December 20, 2012

Why Samsung rules Android !?

Following previous blog
which was very successful, Alexey asked me to publish this one as well:
Somewhere around October published Brian S Hall this article, you are welcomed to read it.
Alexey “Technologov” did an analysis after this pierce and here it is:

I have bought a Galaxy S3 few months ago, was absolutely stunned by it, so I went to learn Android from others.

Brian S Hall said:
Apple = Hardware + Software + Ecosystem.
And Samsung = Hardware.
This is WRONG!

Many people think that all Androids are equal, and this is a race to the bottom with cheapest vendor wins. This could not be farther from truth.
In reality: Samsung = Hardware + Software. (+small ecosystem inroads)
I decided to compare *software* in this article.
Here is the outcome:
Differences between Samsung Android 4.0 (i9300 Galaxy S-III) and vanilla Google Android 4.0 (Nexus or Chinese phones) are HUGE:
[in square brackets I put the bonus effect of a particular feature on total handset value]
killer features:
Samsung Smart Stay - phone looks at you, and does not shutdown screen as long as it detects your face. Killer feature! Worth at least +10% of total handset cost! [+10%]
Video Pop up play - lets me browse the web + see video clips same time!
In video clips, the main focus is music, not the video, so I focus on the Internet, while putting only half-eye on the video clip.
This is available on PCs since Windows 98, yet lacks on every other smartphone! Killer feature!  [+5%]
A long-long list of smaller "nice-to-have" features:
Each feature by itself doesn't change the picture, but combined together, they increase the value of Samsung Android products.

-Shortcut to screen brightness (this is imba simple to implement, very small, yet super-useful feature, as I tend to change screen brightness very often, and it is super-easy with the S3)
Why haven't Google done it ? Because Samsung UI team do better job of human user experience testing. This is why I value it so highly, and can easily justify another $20 on this feature alone. [+3%]
-Samsung gestures (screen-shot, double tap, etc...) [+3%]
(I can swipe my hand over Galaxy S3 screen, and it will take a screenshot ! This is imba cool)
-better icons (TouchWiz UI) [+3%]
-extra codecs: *.wma, *.wmv (I'm kind of shocked and surprised, that Sammy intervened so deeply in the O.S) [+3%]
-assistive Flashlight widget (this is much easier to use as widget, rather than other flashlight applications) [+1%]
-Much improved lock-screen with water effects [+1%]
-better Clock app: has smart alert (slowly increasing volume in morning, so I don't need a hammer to silence my phone), timer, stopper, world clock (multi-time zone). Everything integrated with one GUI. [+1%]
-Dropbox 50 GB for free for 2 years (cloud service) [+1%]
-S-Voice (cloud service) [+1%]
[Not yet valued features:]
-S Memo / S Note
-S Planner
-S Beam (NFC+Wi-Fi direct combo)
-AllShare cast (remote desktop/streaming) - with Samsung TV.
-Music Player and Video Player software in S3 are superior (made by Samsung)
Based on my rough estimation, I believe, that Samsung Android worth over at least +25% (perhaps +35%) more per device vs. non-Samsung Android of same hardware. (depending on the values you put on those individual Samsung Galaxy S3 features)
In other words, if the (hypothetical) Galaxy S3 comes with vanilla Google Android 4.0, I could pay like 3000 ils (Israeli Shekels) for it, but for the same hardware with Samsung Android 4.0, I could easily justify 3750 ils for it. This is the "Samsung premium" I would happily pay for their *software* alone.

At this rate, I expect Samsung to keep on improving software in Galaxy S4, and keep charging a premium over the other Android vendors.
My recommendation: If you don't believe me, just use the Galaxy S3 for a month, then try the vanilla Android for a few days. You will understand the difference very quickly. You will not want to go back.
Now let's compare true value, or so-called bang-for-the-buck:
Galaxy SIII 16 GB i9300 vs. Galaxy Nexus i9250
Price 3300 vs 2400 ils. (Israeli Shekels, Sep. 2012 from
+38% higher price.
Hardware: (value for me)
MicroSD slot +15% (I put 64 GB of extra storage, used for videos --
use case is to convert the S3 into an HDTV in my pocket and watch it in bus or parks)
Bigger Battery +5% (2100 vs 1750 mAh) (again, for traveling reasons, I take 3 batteries when on long travels. Probably would have to take 4 if I were using a Nexus.
Replacing the battery is just a 1 min inconvenience on my Galaxy S3. For normal work days the S3 battery is good enough, and I still have ~25% at the end of the day.)
CPU Quad-core +5% (potential of HEVC decoding, future-proof)
Camera (8mp vs.  5mp) +0% (I don't care, but other people might put a value on it) = +25%
Software, as mentioned earlier, worth at least another +25% premium for the S3.
S3 value is at least +50% higher than the Nexus ! (price only +38% higher)

Bottom line:
The Galaxy S3 is one of those rare gems, that even after huge marketing spending, it still delivers a great bang-for-the-buck, and I can easily justify the premium. And I rarely buy marketed computers.
The actual material usage (BOM), bill-of-materials, and complexity, is probably close.
Producing the S3 hardware costs Sammy maybe +5% more over producing the Galaxy Nexus (my rough estimate is around $220 vs $210 per handset). But they can easily charge +50% extra for it. Easy profit.
Few words about HTC:
HTC lacks killer features of
Samsung in the software department: namely Smart Stay and Video Pop Up play.
Also HTC One X lacks both removable battery *and* removable storage (MicroSD), for me it is worth no more than the Nexus, maybe less. Indefinitely *much much* less than the Galaxy S3. I would be ready to pay between one-half to two-thirds for the One X, if I needed a new phone today, vs the S3 price.
One last note- Samsung Android 4.0 is better not only than Google Android 4.0, but also wins vs. Google Android 4.2, and on tables Samsung's advantage is even greater, due to the introduction of world’s first full-blown Window Manager for Android, allowing you to have multiple windows floating around, just like on MS Windows. Just look at Samsung Galaxy Tabs and you will understand what I mean.
I would love to read your thoughts about it…

Wednesday, December 19, 2012

Sound of MP3 players

Today I would like to introduce a very special guest post from Alexey Eromenko.
Alexey known also by the nick name 'Technologov' is involve in the "contrib" project; also in GNS3 which is a graphical network simulator that allows simulation of complex networks; 
Among other things he is part of the Dynamips community which is a Cisco router emulator, the original project was abandoned for a long time but the community decided to keep improving it under the name of "Dynamips community version" or "Dynamips-community"

On his spare time he is beta tester for OpenSUSE and wrote most of the articles in "Lessons for Lizards" community book about openSUSE. 


Multimedia Codecs supported by portable MP3 players, including smartphones

Out of curiosity, just decided to do a global analysis of various portable MP3 players, and what they do support. Analysis includes both dedicated players and smart-phones, by world-wide units ever shipped in history.

Major formats/codecs:
1. MP3 (The world’s first popular audio codec)
2. AAC (Advanced-audio coding, MP3 successor)
3. WMA (Microsoft Windows Media Audio)
4. OGG Vorbis (*.ogg; Free Software and patent-free codec)

First format is of course - PCM WAVE. (*.wav; uncompressed lossless CD-quality audio; one song often takes 80 megabytes at 1400 kbps !) Due to the huge size each song takes, it is rarely used for portable audio or for Internet downloads.

MP3 - the universal format, standardized in 1993. Became popular to due online sharing of illegally downloaded music in early 2000’s (Napster, Kazaa) and due to the little space it takes, which is especially useful on portable players. Good quality can be achieved at 128 kbps, compared with 1400 kbps for uncompressed PCM Wave makes for a 12x storage efficiency. Open specification, but requires patent royalties.

AAC - the successor of MP3, ratified in 1997. Provides good quality, even at 64 kbps. Open specification, but requires patent royalties. This is pretty much the standard on Apple Mac OS X and iPhone devices. Due to it’s MP3 succession, more logical name would be a (*.mp4), but it got (*.aac) extension instead, while the MP4 format is usually used to describe MPEG4 based videos.

WMA - First released in 1999, Microsoft decided to develop their own codecs, to reduce dependency on world’s standards, as well as to collect royalties from others. Most music gets encoded into it by Windows Media Player, that rips CDs into this format by default. It achieves good sound quality at 64 kbps. Open specification, but requires patent royalties to Microsoft. It comes default on any modern version of Windows.

OGG Vorbis - Developed in 2000, This is the world’s first 100% Free-software format, that is also patent-free and high-quality lossy audio codec. It was developed by the Open-Source Linux community, as an answer to the patent-encumbered MP3 format, and is widely deployed and recommended in the Linux world. As a Linux user, I use this codec, and it achieves great sound quality at 64 kbps. This is the only audio codec, that is massively supported under GNU/Linux desktop systems. (even MP3 is not.) It can be installed as a separate codec on your Windows PC too, of course.
Vorbis advantage is two-fold: It sounds much better than MP3 at low bitrates (64 kbps) and allows you to save a lot of space, and is widely supported by Free and Open-Source Software.

NOTE: Vorbis too, has a successor, released in late 2012, codec named “Opus”, that got IETF certification standard, and is considered the best audio codec in the world. I expect future Android releases to support Opus. It is a universal codec, that may replace both Vorbis and speech-related (VoIP) codecs at ultra-low bitrates, and with low delay. On top of Vorbis advantages, it adds flexibility. It can go from 6 kbps up to 256 kbps per channel. Skype already announced their intent to adopt Opus.

Major dedicated portable MP3 devices:
Apple iPod (~66%, or 2/3 of dedicated MP3 device market), at 300 million units sold. [1]
Others combined (30%; iRiver, SanDisk, Chinese S1 MP3, Creative, Microsoft Zune, …; 150 million estimated)

Codec supported by Non-iPod devices: (150 M devices)
MP3 = 100% of devices. If a device does not support MP3, then it is not an MP3-player ;) @_@
*AAC = 75%. (not supported by some SanDisk models and by Chinese S1 MP3)
*WMA = 60%
*OGG Vorbis = 20% (?; iRiver, some Chinese S1 MP3 models, some SanDisk models, Cowon, and few other brands support it.) [5]

[*] Based on my observation in local shops in Israel, as well as some online shops of MP3 players. Additional information source:

All portable MP3 dedicated hardware:
MP3 = 100%  (all devices; 450 million)
AAC = 92% (300+112 M = ~412 million)
WMA = 20% (90 M out of 450 M)
OGG Vorbis = 7% (30 M out of 450 M)

Well, AAC supported almost universally, except for the Chinese S1 MP3 player, and few others, while OGG Vorbis has poorest support among the portable hardware MP3 players.
Apple supports only MP3 and AAC codecs, of the popular four. [3]

Major smartphone MP3 devices:
1. Apple iPhone - 200 million devices
2. Android - 500 million installed base. (of those about 40% also support WMA, due to vendor customizations of Android O.S itself) [2]
3. Windows Phone (WMA, MP3, AAC) - ~20 million devices. [4]
4. BlackBerry (MP3, AAC, WMA, and Vorbis on newer models, say 50%) - -~200 million devices [6]
5. Nokia Symbian (MP3, AAC, WMA) -~ 250 million devices [7]
(***NOTE: Here I do not count music-capable dumb-phones, because I really don’t know the percentage of dumb-phones (S40?), that can play user-supplied music at all, besides built-in ringtones)

Smartphones: (1170 million)
MP3 = 100% (all smartphones, that I know of, support MP3)
AAC = 100% (all smartphones, that I know of, support AAC)
WMA = 57% (500 M*40% = 200 million Androids with WMA + 200 M BlackBerry + 250 M Symbian + 20 M Windows Phones = 670 million)
OGG Vorbis = 51% (500 M, all Androids and 100 M newer BlackBerry support it, but no other smartphone does = 600 million)

Total devices installed base: (1170 M smartphones + 450 M MP3 players = 1620 million devices total)
MP3 = 100% (1620 M, yay !)
AAC = 98% (1582 M; all smartphones, plus most MP3 players support AAC)
WMA = 47% (670 M smartphones + 90 M dedicated players)
OGG Vorbis = 39% (600 M smartphones + 30 M dedicated players)

Yeah ! Total portable music players, with the advent of smartphones, have surpassed one Billion (with a B) units sold !!!

Now, with the stunning success of Android, the free codec, OGG Vorbis, is quickly catching up to Microsoft WMA.

Apple devices make up almost one third (500 million out of 1620 million) of total devices. Same for Android.
Apple in the meantime keeps selling 5 million iPods per quarter in 2012, and while I see the need for mini-MP3-players (such as the Nano and Shuffle, for sport activity), I see zero use cases for the full-sized iPod Touch. If you know about any use-cases, please share.

A word to cell phone and music player manufacturers: If you wanna sell devices to Linux users, you better support Free Software formats out-of-the-box, including OGG Vorbis audio, new Opus and WebM video; Supporting FLAC (Free Lossless Audio Codec) and Speex is a bonus. Needless to say that I own an Android-based super-phone, the Samsung Galaxy S III, and recommend it to people.

[1] 300 million iPods:,2817,2394061,00.asp
[2] WMA on Android: For example, Samsung Android 4.0 on Galaxy S III *does* support WMA (and WMV), while vanilla Google Android 4.0 (on Nexus and cheap Chinese Androids) does not. Some Motorola Android devices also support WMA. Official formats supported by Android:
Google: 500 Million Android Devices Have Been Activated Globally
[3] iPod: About compatible song formats
[4] Supported media codecs for Windows Phone
[5] SanDisk MP3 players supported codecs
[6] BlackBerry codecs support
According to Wikipedia, BlackBerry sold 200 million smartphones by Q3 2012 during history:
...and 100 million of those 200 in the last 2 years.
[7] Multimedia Codecs available in Nokia Symbian devices:
Nokia shipped 250 million Symbian smartphones:

Open Questions:
What is the exact total number of iPhones sold till Q3 2012? (my number is approximate)
What is the exact total number of iPods sold till Q3 2012? (my number is approximate)
What is the approx. total number of other MP3 players sold till Q3 2012?
What is the approx. total number of MP3-capable dumb-phones (S40 ? Brew?) sold till Q3 2012? ...and which majors OSes they run, and which codecs do they support? How to analyze dumbphones ? By major companies and firmware family / O.S ?

Extra sources of data :
Look At the (Cell-phone) Handset Industry, Market and Installed Base in 2012 (by Tomi Ahonen)

You’re permitted to USE, COPY, MODIFY this document under the terms of BSD license. See:

by Alexey Eromenko “Technologov”, Dec.2012.


Please share your thoughts and insights ...

Wednesday, November 28, 2012 is spying after you.

Recently I registered into and was looking for some manpower for a future plan I have.

Everything was fine until one of the guys at my company came to me asking If I know that someone is tracking my steps.
We opened Wire Shark to investigate it a little further only to find out that oDesk is the one that following my steps.

Now, I think it is important to mention I am working for a security company so I know things, more then that is the fact we have a product just for issues like this, to look for Malwares, Viruses and other bad guy's applications.
I will not say the name of my company or what is our product because I am not coming to advertise; I came out of respect to my community and to warn others.

So in case you are oDesk registered user, please read some pages which explain how to identify this specific malware called- iesnaer and of course how to remove it and prevent it from downloading again.

After I read the above sites I did a simple Google search and found that I am not the first one to complain about oDesk spying, see this-

One thing important to write is that I don't know why oDesk is doing that and what they intend to do with the data they collect. They may do it out of a good and innocent reason; but I know for sure they didn’t ask my permission for such an act and I know that I don’t like being followed by strangers.

In case you have more input on that case and would like to share with others, be my guest.

1-Dec-2012, Update-
I got the following response from today:

Thank you for sharing your concerns about the use of iesnare. Our privacy policy addresses your concern, and is set forth in detail in Section 2.13 of oDesk's User Agreement.   

As stated in the first paragraph, "oDesk reserves the right to use the general data (not personally identifiable) it obtains from Users' use of the system, including all statistical information.  You acknowledge that such data belongs to oDesk and that oDesk shall have the right to use such general data as it determines in its sole discretion." The device id assigned by iesnare is not associated with personally identifiable information, and the use of the device identifier can accordingly be used at our discretion--such as to detect possible instances of fraud or attempted breaches of security.   

Additionally, Section 2.13.5 of the User Agreement explains, "We also collect IP address and other system information for purposes of statistical analysis and to maintain the trust and security of the oDesk Platform." An example: oDesk uses the system information it collects to detect situations in which a user may be violating other sections of the oDesk User Agreement, such as the requirement that each user have only one oDesk account, and that each oDesk account be used by only one user.  In this way, oDesk protects the integrity of our marketplace and strives to provide a higher quality experience to our users. 

We believe that our practices are reasonable and that our disclosure of them is sufficient under applicable law. We recognize, however, that your opinions on these matters may differ, and we respect your right to terminate your use of oDesk, if you so choose. 

oDesk "

Thursday, June 14, 2012

JavaScript from scratch

Simple makes you happy

So you probably read my previous post where I was talking on the reasons why I started to learn JavaScript.
As a first step I logged into, opened an account and did the first thing which is typing my name “Hod” and see the results.
It is funny to see how a simple thing like typing and see your name as the result  makes you happy, you get the feeling that you can do anything, any program, any coding, any obstacles. I can do JavaScript!

Code Year

Codecademy is a very simple functional site; you understand right away what you should do, what the next steps are and where you are going.
They give you some options to choose of the provided courses and all you have to do is decide on which path will you go and study.
I took the ‘Code Year’ course which contains JavaScript, HTTP and CSS. 
Update- After reading some reader’s comments- I will continue to their JQuery when finish this one.
‘Code Year’ made of 23 subjects, each subject supposed to take you a week and each week get you closer to know how to program and what techniques to use.
I started of course with the basics, lucky me I know the basics from study Python only few months ago, all you need to do is the adaptation from one to the other.
The basics went pretty fast and after few hours I was ready to write my first project- the game ‘Fizz Buzz’.

My projects

Fizz Buzz- See my code over here- Fizz Buzz project inside github
Or inside my Dropbox folder- Fizz Buzz project inside Dropbox
Do not worry; it is my Dropbox folder, no malicious code here.
After few more classes made of Functions and conditionals I was ready for my next project  ‘Roll the Dice’. See github and see Dropbox.
After learning arrays, primitives and some more I was ready for my next project which was creating an address book. See github and Dropbox.
And finally I did my last project which is to build a Blackjack game (well, at least to build the start)
You can see the code and play using github and Dropbox


Objects (Week 5) were the first time I had hard time to learn.
It is a concept I didn’t meet before and I found myself reading lines over and over to understand the terms being used.
I did well in the course and even find myself explaining others how to fix their code but in overall it is a very hard subject and I think I will re-learn it just to be sure I am cover here.
The project over here was to write a Cash Register and you can see my code in github and Dropbox.

Your input …

As I wrote before, I want to re-study Objects / OOP only to be sure I am 100% controlling it.
I hope you (the readers) can tip me about this subject, maybe you know a site that explains it the best.
Also, your comments on my code will be highly appreciated.

On a side note- I got an invitation from Codecademy to be their beta tester for future classes, I already ran few classes, report some bugs and will run more in the future.

Tuesday, June 5, 2012

JavaScript vs. Python


I am working as QA since 1998; I was working for big companies and for Start-Ups, during this time I was moving forward in the QA hierarchy and each time it came with benefits; I even had two exits and finished my Computer Science degree while working.
Last time I was writing websites was using some platforms like Geocities, Tripod and Angel Fire and it was so easy anyone could do it; In those days the html language was so basic and all you needed is to choose your background and some text and you had sites as good as yahoo, eBay or similar.
I didn’t put any attention to websites or new technologies and concentrated on my own job as security hacker and network tester.
Today I know that not letting myself open up for new technology was a bad idea, today I am like a newbie who is excited from sites like Twitter, LinkedIn or Facebook.

Python from Scratch

Last January I decided that it is about time to do some changes in my life, I felt that the QA position is fun and I do like it but the real thing is waiting for me as a developer.
My ultimate goal is to be founder of something cool and not a simple coder at the age of 40s+
So I read some hacker news posts and finally the decision was done- To Learn Python; you can read the entire posts over here: 1234 and 5
And so I did my On-Line Python class and I was doing fine, I had some obstacles but in overall I was great until my eyes met this site- and life didn’t look the same anymore.
Learning Python was a good start but you don’t really know where you are going with it and what’s next? 
//For those of you who followed me I apologize but that’s something I need to do for myself.//

It’s a kind of Magic

Seeing 42floors was a magic: It is a site that let you in, it welcomes you to use it and explore all the data inside. I never been to San-Francisco but through that site I felt like I am part of the city and in some point I felt like really want to rent an office there. The site is extremely User Friendly and easy to use.
Bottom line, I knew that this is what I want to do, to build a site just like 42floors and so I sent an email to the founder of this site and till today didn’t get any response, that didn’t stop me- If you can't join them bit them (I know it is beat and the opposite around). My next step was looking for an answer- "How long will it take someone like me to build such a site" and posted that question in hacker news.
The answers were very detailed but also some disappointed, most said around 3-5 years to be near to that level, well, that didn’t stop me neither, once you find your destiny you should do anything to achieve it; Follow one of the leads I logged into and signed-up to the "code year" course which teach you JavaScript, HTML and CSS.

More to come …

Now that I am aware to that language I can see how this language is taking amount of career ads around the world, how the ‘front end’ position is needed.
I will write more about my experience inside Codecademy and JS lessons in next post but for now I am doing well. I hope you will stay with me on my next posts.
I will be happy to read any thought or comment coming from you guys

Update- After repeating questions I must say that I didn’t quit Python but just put it aside and currently focus only on JS new adventure.

Please click here for the next post

Tuesday, May 22, 2012

Python from scratch has been deffered

I was in the middle of my struggle to solve the battleship case using Python I am learning these days.
I was good, I had a good lead and things were working quite well to me when I saw a message in HN community about a great site must see- .
So I clicked the link and what I saw there is "Life Changing"
42floors is most of all the best UI and User Friendly site I have ever seen.
It is so easy to navigate, search and read information inside this site.
Also, the idea behind the site is so appealing to me, I was always thinking to myself "How do businesses find their space?" and how the opposite happens- "How do locations make themselves available to others?"

It took me few minutes to know that I must delay my Python from scratch study and try to understand how the hell this site is working.
So I posted Ask HN question and waited for the answers.

From the answers I realized that for me to be even closer to that level of site it may take years but in the other hand I can still go step by step and learn what seems to me now the future- Front-End programming (JS + CSS + HTML5)

You are probably laughing and saying- Dude, what's up with you? this is so old news.
Well, for me this is a big news.
Yeah yeah I know it looks like I was far away when all this revolution took place comparing to the time I was writing sites using FrontPage or Geocities.

Anyway, the day after I registered to code academy following one of the suggestion and I started their code year course which contains JS first, later CSS and last HTML5.
I am doing well and the course is so far very good to understand and I really feel like catching it, I even going into the Q&A pages helping others like me to solve their issues.

So for now this 'Python from Scratch' Blog series is temporary deferred.
I would start a new series of writing and will call it 'JavaScript from Scratch'
I would like to thank all the Python users who read and commented on my posts.
And if you find my new journey interesting- I ask you to follow me and drop a comment or two.

Tuesday, May 8, 2012

Python from scratch vs Battleships

I guess by now you already know who I am.
You already read my "Python from Scratch" 1, 2, 3 and 4
You know that has selected me to be one of their Blog writers.
You know that I have decided to take the shortcut and instead of reading lesson after lesson I just jumped into a project, to find a solution for a game called Battleships.
In case you do not know this game and in case you want to learn the rules please read my last post which describes the game and rules and what I have ahead to accomplish.

I got many comments and tips to my act, it inspired me a lot that I am doing something right.
In this post I will try to share with you the way I want to design the project, the way I believe is a good and clear solution. This is my vision but I am open to hear tips from others (after all you are already coders while I am only study from scratch)

So let's start the game …

Constant definitions:
·                    First I will need to define the board 10x10:
o       Rows will be called 'row_1', 'row_2' ...'row_10'
o       Columns will be 'column_1', 'column_2' …'column_10'

·                    To define the various ships:
o       Battleship (4 cells in a row)
o       Cruiser (3 cells in a row)
o       Destroyer (2 cells in a row)
o       Submarine (1 cell only)

·                    Status of a cell:
o       Unknown
o       water_cell
o       Part of a ship Rounded_ship
o       Part of a ship Squared_ship
o       Part of a ship Start_right_ship
o       Part of a ship Start_left_ship
o       Part of a ship Start_up_ship
o       Part of a ship Start_down_ship
o       Part_of_ship

·                    The initial data
o       Input of row's numbers will be called 'input_row1', input_row2' …
o       Input of column's numbers will be called 'input_column1', input_column2'…

Once I have all the constant and initial data ready and set I need to start my moves
First I will start with the easy moves that need basic analysis-

·                    Create a counter that counts number of cells which have not discovered yet
o       At first it equals the input
o       Any cell which is part of a ship will be deduct from that counter
o       Counter for rows will be called 'counter_hide_row1', 'counter_hide_row2' …
o       Counter for columns will be called 'counter_hide_column1', 'counter_hide_column2' …

·                    Create a counter that counts number of already painted cells (part of a ship)
o       Counter for rows will be called 'counter_painted_row1', 'counter_painted_row2' …
o       Counter for columns will be called 'counter_painted_column1'  …

Easy and important move is to paint any place with water, this way I eliminate these cells-

Moves to mark water cell
·                    Read input_rowX and where it is 0- to mark with water_cell the entire row

·                    Read input_columnX  and where it is 0- to mark with water_cell the entire column

·                    If counter of already painted cells equals input (and count_hide equals 0) then:
o       Mark with water_cell the entire unknown cells in that row
o       Mark with water_cell the entire unknown cells in that column

·                    Mark with water_cell adjacents of marked ship (or part of it)
o       If entire ship discovered then all around it
o       If part of a ship Squared_ship then only in its corners
o       If part of a ship Start_right_ship then only its right part (top to bottom)
o       If part of a ship Start_left_ship then only its left part (top to bottom)
o       If part of a ship Start_up_ship then only its upper part (left to right)
o       If part of a ship Start_down_ship then only its lower part (left to right)

Moves to paint a ship (or part of it)
·                    If number of unknown cells equals counter_hide- Paint entire unknown cells as 'part_of_ship'

·                    If current status is unknown- You may change to a new discovered status (water or ship)

·                    If current status is water_cell it may be equal only to new status water_cell

·                    If current status is a ship it may be equal only to new status of the same

·                    Any other result- FAIL and Print to debug.

Next and most important is the decision engine, to find 'Part_of_Ship' cells. This is an advanced analysis.
I will keep it to the next post.

For now I would like to get feedbacks to my work so far.
Do you think it can be done differently? Better?
Any tip or a good advice?