The luck factor

I was just in the middle of writing a post about my favorite board game, when I decided to play Tichu with a friend of mine. Then my defeat got me so frustrated that I decided to express my opinion about the luck-based games, like Tichu. Don’t worry, my previous post has been saved and will be finished soon.

So, what useful do I have to tell you? One phrase. Don’t play luck-based games, unless all you want is to make time pass easily. Sooner or later, you will realize the fact that the ratio (time given/gain taken) is too high. Some people don’t care about that. They just want to relax and not think much about things. Well, if you fall under that category, then you just have to compromise with everything luck is cooking for you. I think this is where I fail and don’t enjoy much this game. I expect justice. If you were lucky two or three consecutive times, then I am pretty sure that now it is my turn. However, half the times it is not.

My second advice is the following; Don’t resist against the luck factor. My strategy in this game is the memorizing of almost every card I can possible memorize. So, here is the trap. It doesn’t matter if you are able to find out your opponents cards, if you can’t block their way to victory. It wouldn’t be a luck-based game if you could.

When you have no negative

This semester, we have a quite unique Lab at CEID about the architecture of a computer. What we do is building the assembly commands of a system using 1s and 0s. You know, in order to make a computer first you take the hardware, then you make the assembly commands and then the high level programming languages.

In the last exercise before the final exams, we were asked to construct some commands that will help us find the maximum number in a sequence of memory blocks. The numbers are all natural. So, let me show you the commands we had in our toolbox.

LDA $K: Load the content of address K to the register Accumulator (an arbitrary register)
STA $K: Store the content of Accumulator to address K.
MVI R,#K: Move the number K to register R.
MOV R1,R2: Copy the content of register R2 to register R1.
MOV R,M: Load the content of the address M to register R.
MOV M,R: Store the content of the register R to the memory’s address that is equal to M.
INR R: Add 1 to register R
INX RP: Add 1 to the registers R and P pair.
DCR R: Subtract 1 from register R.
DCX RP: Subtract 1 from the registers R and P pair.
CMP R: Compare register Accumulator with register R.
CMP M: Compare register Accumulator with the content of the address M.
CPI #K: Compare register Accumulator with the number K.
JZ $K: If zero flag equals 1 go to K.
JNZ $K: If zero flag equals 0 go to K.
JC $K: If carry flag equals 1 go to K.
JNC $K: If carry flag equals 0 go to K.

We were given two numbers, X and Y, which represent where in the main memory is the first and last number of our data, as well as the rest of the numbers between them.

Well, how do we find the maximum number? Obviously, we have to use the compare and conditional branch commands but there is a problem. When we want to compare two numbers, a and b, we subtract them and then we observe if the result is positive negative or zero. Then we use this information to satisfy a condition, like an [if(…),go to] conditional statement. Basic programming ideas. Alright, can you see the problem here? We don’t have have any [if(…),go to] for negative results. Although, the system supports it, we must make our program using only these commands.So, we must exploit the carry (=1 when the result is greater than 256) and zero (=1 when the result equals zero) flags.

Here’s my idea. Let’s say we have two numbers, a and b. Using the compare command would be useful only if a=b. Then, all we have to do is go for the next number in our list, because we are just searching for the maximum of them. What if a is not equal to b? How can we figure this out using the carry or the zero flag? Well, take the first number and start decreasing it using the DCR command and after every decrease use the compare command until one of the following happens. If CMP gives a zero flag after some using of DCR then a>b. Now, if DCR gives a zero flag then a

The online car

It ‘ll take you some time to find an electronic device that is not able to connect to the Internet, if it was made the last 3 years. People say that, after phones, tablets and DVD players, cars is the next big category that is going to get included in the Internet compatible systems. We have seen cars with TV’s and game consoles before. What we haven’t seen, yet, is permanent Internet access while driving. The main purpose here is to ease the boredom of the passengers and maybe relax the driver, if he is getting tired after miles on the wheel.

But, in my opinion, there is an other goal behind one or two hours of Internet surfing. Imagine a smart-car. A car constructed for two reasons. Getting people from point A to point B. Ability to install third party applications, just like you do with your iphone or android or whatever. Well, that would skyrocket its usefulness. Perhaps, you should try to remember what was the mobile industry before and after the applications fever.

Of course, some thoughts about the possible applications have already been made. Since you use your car for driving, the most famous is the “talking to your car application”. So, if you already have a permanent Internet connection, you can get a whole bunch of comforts. Another one is the “check the traffic application”. How many times you have been stucked in the traffic not because you didn’t know a way around but because you were not informed about the cause of the traffic at all?

The truth is, I didn’t just wake up this morning and decided to make a post about cars. I watched a webinar by IEEE regarding this issue. Its name was “The Online Car: How Will Cars Change When Permanently Connected to the Internet?” and I heard a very interesting question that wasn’t answered properly. The question was how can the engineers monitor and control the apps the user wants to install. As we all know, there is no electronic device/gadget unhackable. I don’t believe that someone might get control of the car or something. Stuff like that can only happen in batman movies. Even then (Batman 1989) it was a hardware hack. But, what if something goes wrong and you need to reinstall the firmware? You should bring your laptop and things are going to get as complicated as the manufacturing faults. What if the system crashes while you are on a 500 Km trip?

In addition, check this out.

MIT and 6.002x Circuits and Electronics

This semester I am lucky enough to attend MIT’s Circuits and Electronics course. As some of you might know, MIT is offering this course online free of charge. Anyone around the globe with an internet connection can benefit himself from the knowledge MIT is willing to share.

The course is divided in 14 weeks. Even now, anyone can still enroll and start watching the lectures. But, as of Monday 30/4/12, we have passed the deadlines of 7 weeks, including the midterm exam. So, in case you are interested in the certificate that is given to anyone with grades above 60%, let me do the calculation for you. Lets say you score 100% in the last 5 homeworks/labs and the final exam. That’s 5*1.5+5*1.5+40=55%<60%.

Anyway, that’s not the purpose of all this.  This is all about spreading high quality of knowledge across the planet. Professor Anant Agarwal is making the lectures through a series of 5-10 min videos. The textbook of the course is the “Foundations of analog and digital electronic circuits” co-authored by Mr. Agarwal and most of it is online in the course’s website. So if you can’t afford it, dont worry. In addition, a discussion board has been built to help the student communicate with each other.

Ath the end of each week, there are some extra videos in which more practical problems are been discussed. For example, just after we learned about second order systems, there was an extra video demonstrating how we can build an LC oscillator or a DC-DC converter. In my opinion, this kind of teaching makes universities like MIT what they are. In my university there is almost no practical motivation in the electronics courses.

Something I must not forget to mention is edX. Edx is a collaboration between MIT and Harvard with one goal. Open free university courses for everyone.