2016-03-28

Rooting my Samsung Galaxy S2 mobile phone

So, I bought a brand new Samsung Android phone, and it was a huge disappointment due to all the distracting, annoying, and completely useless crapware from Google, Samsung, Vodafone, and even Yahoo, which came pre-loaded with the phone and which I am not allowed to uninstall.  I mean, never mind that a certain application is useless; suppose it is in fact very useful; and yet, suppose that despite it being so awesomely useful, I for some reason still want to uninstall it.  It is my phone, I should be able to do it, right?  But no, the powers that be have decided that I am not allowed to uninstall apps from my own phone. Even when they are not only useless, but actually harmful, since some of them are always running, thus consuming memory, CPU cycles, battery, and communications bandwidth. Some apps can be uninstalled, but many others cannot be uninstalled.  They have to stay on the phone.  Whether I like them or not.

After this horrible experience I am very seriously considering the possibility that next time I buy a phone it will be an iPhone.  But for now, I am stuck with Android, so I am now learning how to root my phone so that I can be somewhat in control of the situation.  I am experimenting with my old phone first, a Samsung Galaxy S2.  Here are my notes.

2016-03-21

Solved: Brightness control keys do not work on Asus Laptop

So, the brightness keys on my Asus Laptop do not work anymore.  All other Fn keys still work, but the Fn+F5 and Fn+F6 keys which control brightness do not work anymore.

The way to solve this problem is as follows:

Initiate an update of the driver of your monitor. This can be accomplished in many ways, for example:

1. Right-click on the desktop
2. Select "Display settings", then
3. Select "Advanced display settings"
4. Select "Display adapter properties"
5. Switch to the "Monitor" tab
6. Click on "Properties" for the monitor
7. Switch to the "Driver" tab
8. Click "Update driver".

Alternatively, you can:

1. Hit Win+Pause to open the "System" window
2. Click "Device Manager"
3. Find your monitor under "Monitors"
4. Right-click on the monitor and select "Update Driver".

Once the "Update Driver Software" dialog is up:
  1. In the wizard which prompts you whether you want to search automatically or browse your computer, lie and say that you want to browse your computer.  (Windows is so messed up that you have to lie to it to coax it to work.)
  2. On the next screen, do not browse anything, select "let me pick from a list of drivers on my computer".
  3. On the next screen, select "Generic PnP Monitor" and click "Next".
  4. You are done.
Source:
http://visihow.com/Restore_Lost_Brightness_Control_app_in_ASUS_Laptops_After_Updating

2015-10-21

The Mother of All Bugs

Michael Belivanakis 2015

At some point in my career I was working for a company that was developing a hand-held computer for the area of Home Health Care. It was called InfoTouch™. The job involved daily interaction with the guys in the hardware department, which was actually quite a joy, despite the incessant "it's a software problem --no, it's a hardware problem" arguments, because these arguments were being made by well-meant engineers from both camps, who were all in search of the truth, without sentimentalisms, egoisms, vested interests, or illusions of infallibility. That is, in true engineering tradition.

During the development of the InfoTouch, for more than a year, possibly two, the device would randomly die for no apparent reason.  Sometimes it would happen once a day, other times weeks would pass without a problem. When it happened, no matter how hard we tried, we could never reproduce it.  Also, some times it would die while someone was using it, but other times we would come into the office in the morning to find that it had died during the night, while sitting on its cradle, doing nothing but charging.

2015-10-18

Computer telephony in C++ with MFC

Back in 1999-2000 the state of the art in computer telephony was called Interactive Voice Response (IVR).  Nowadays when we speak of "voice" we usually mean voice recognition, but all that those telephony systems did back then was to playback recorded messages and wait for the caller to press digits on their phone. Sometimes, we would ask the caller to speak on the phone, and we would record their voice, for a human operator to listen to later.

The hardware had special filters on it to recognize the DTMF digits, probably because the CPU was thought of as too wimpy to do it by itself.  I experimented writing WAV-file processing filters on my own, and discovered that it took less than 10% of CPU time per phone line to run such filters in software, so it could certainly be done, but then again there existed systems out there in configurations of 30 or even 100 lines per computer, and of course the CPU was not enough in these cases.  We only worked with configurations of four lines per computer, but still, since the filters were made available by the hardware, I made use of them for the work project, and I only re-invented the wheel at home, for fun.

My employer at that time managed to secure a number of computer telephony contracts for a couple of big clients; he gave me a rough description of what the projects were supposed to do, and he had my coworkers slide pizza under my office door for as long as it took me to complete them.  He probably charged his clients the equivalent of a dozen programmers for this, and it was all done by me.  The only external help that went into these projects was messages recorded by a professional at a recording studio.

What follows is some screenshots of the telephony application that I created to run these projects, in Microsoft Visual C++ using MFC and the Dialogic Telephony API.

All applets waiting to start. Click to enlarge.

Crossword Puzzle Compiler

Summary (just gimme the TL;DR)


I wrote this program in C# back in 2003.  You give it a crossword grid, and a long list of words, and it finds ways to mesh words into the grid so as to form a complete crossword puzzle.  This is the kind of problem that cannot be solved by brute force, because it would take eons to complete. So, a simple AI trick is used: when it has a number of words to consider, instead of starting to try them all one after the other, (brute forcing,) it first assigns a score to each word based on how many words can be found perpendicular to it, then it sorts the list of words by score, and then it begins trying words starting from the one with the highest score. 

The following 30-second video shows the crossword compiler in action, filling multiple successive crosswords using a word list taken from actual crosswords that have been published on the interwebz by various sources through the years.  The video is in real time, showing that the crossword compiler is, in most cases, extremely fast.


2015-10-04

Portfolio

I added a page where I list posts on this blog that can collectively serve as my portfolio.

It can be found here:

Michael Belivanakis - Portfolio



2015-09-26

Is my mentor's concern for code quality excessive?

There is this question that was asked on Programmers SE on Jun 12, 2015 which I answered, and as a result I received plenty of reputation, as well as a silver badge. Unfortunately, after a few days the question was closed as primarily opinion-based and then deleted.  Since I now have sufficient reputation to view deleted questions, I was able to find it, and I am posting it here for posterity.

Is my mentor's concern for code quality excessive? [closed]


Score: 75 (79 upvotes, 4 downvotes) Favorites: 28

To tell you a little about myself: I'm a newbie programmer working internships and learning a lot from experienced programmers. I can't believe I used to think I was good in college.

The one I'm doing right now is pretty great due to the amount of time and resources that the company is putting into helping and mentoring me and another intern. I'm learning a whole lot and for the first time, I feel like I get close to being competent.

The only "problem" are the massive code quality concerns of one of my mentors. It's to the point that anything takes a whole lot of time because I have to find the best way to do it or else it's a waste of time. It also feels like my creativity doesn't matter because there is only one right way to do everything. I don't mind any of this at all but I wonder, and this is mainly what I'm asking, if it's normal in the industry.

Also, when I get assigned a little feature and this guy reviews my code, he actually reviews the whole codebase I'm working on, pointing out loads of mistakes, most of them from before I was even hired. I have spent this whole week fixing code (that worked) written by their full-time programmers, even some things that are best practice according to other mentors.

Tags: [] [] [] []

asked Jun 11 2015 at 18:51 by CyborgFish
The question received 14 answers before it was closed.

The highest ranking answer was by Thomas Junk, with 130 points (gold bage is awarded at 100 points.)

The next answer was mine, with 71 points. (silver badge is awarded at 25 points.)

Here it is: