Wednesday, 10 February 2016

Studying, becoming a scientist, becoming an engineer.

A degree in informatics or computer science. Magical words, dividing so many tech people into supporters and haters. I often hear "I wanted to make computer games and I am forced to understand numerical methods. I don't need them! I've got Unity!" And I wonder where we went wrong with understanding what this is all about?

I may be personally biased as I do hold a degree in science. BUT I do not think that a degree is the only right way, nor do I believe it is a waste of time. It should be also noted that information technology, software and hardware are generally quite different from many other disciplines, so some statements are definitely not meant to be applied outside IT.

So, you wanna be a software engineer? That's a great start. Now there are a few things that should be taken into consideration. Do you want to write software and be great with it, or do you want to understand software inside-out? It may appear to be a stupid question, but imho it is far from that. How can you do something without understanding it?

Well, maybe you can't. But the level of understanding is another story. You can make bread without knowing all the chemical processes going on inside. Similarly, you do not need to understand how compilers work to write good code. Nah, you actually do not need to know what memory management is, how IDEs work or what are the internals of some data structures to write software to some extent. You only need to get some abstractions to start coding, understand what the code does rather than how is it done. Because if you are going to write some basic JavaScript stuff then you may be better off investing your time in learning about web development in general, rather than algorithms, microprocessors and databases. However, there is always a "however".

If you are going to write large systems, you probably will need to understand some more complex concepts from informatics and computer science. Willing to highly optimize your critical code you do need to know what is going on when your code is compiled and interpreted. And if you want to make it even faster, you probably would be much better off knowing some stuff about how CPU works. So, should you get a degree if you want to work on complex systems?

As always, it depends. It is never obligatory to take a course. There are less and less companies that care about your title rather than your skills, and there are plenty of books and online courses on pretty much all CS-related topics. In other words, if you prefer to, you can learn everything you need on your own, and make some project to show your skills. Make it open sourced and throw a link to your resume - it is often better to have stuff like that than just a degree. Because remember: the degree is kind of a confirmation that you had courses on some particular stuff and that you passed some tests. Your skills may be another story, if you do not take care of them.

One of the greatest misconceptions I see reading blogs or listening to people is thinking that studying informatics or computer science aims to make you a software developer. But why would that be? CS is much broader than just programming, and not every great computer scientist is a great programmer! They may be amazing algorithm designers, hardware builder, researchers or developers. Programming is like a subpart of informatics and thinking otherwise is often very misleading. So a computer scientist ≠ software developer. Just like a car expert ≠ a great driver.

So maybe the right question (and not an easy one) is: wanna be an information scientist, computer scientist or software engineer? Those are not exclusive, of course, but there are significant differences. A computer scientist can be a great software engineer, and vice versa. BUT a computer scientist may also suck at writing software or a software engineer may not understand all complex ideas behind some libraries. And this does not make them bad professionals - just their particular field of expertise may lie somewhere else.

Another thing is using "programming" and "software engineering" meaning the same job. Well, this is not quite right and it is not a matter of me being picky here. As a software engineer you should:

  • understand your client's needs
  • design solutions for them
  • write code that implement those solutions (programming is here)
  • deploy that solution so that they can actually use it
Programming is only a part of your job, and this often leads to people being unhappy because this is not how they imagined their job. What is a solution then? The weights of different elements form that mix may vary from company to another. You may find some corporations or startups where your only role is to write code, given some specification. There are also other ones, where you are actually expected to translate natural language requirements to some software related constraints. And this is all software engineering!

So if you went for an informatics course do not be surprised that you are expected to understand Turing machines, Shannon's theorem and numerical methods because as an information scientist you are expected to understand how stuff works, rather than just what it does. But if you "just want to make computer games", maybe a better option would be start with some existing tools and engines, and if you need to get into more complex stuff you can learn that along the way. At the same time remember: the most innovative, cutting-edge technologies are usually developed by people who really know what is going on down to the processor level. In other words, you probably need to get some differential equations to build like an amazing graphics engine. It is not magic there, its beautiful science and engineering behind.

When I see all that "skills not school" stuff it gets me kinda surprised: why would anyone think it is about the degree? If you finished a CS course on a great university, does it make you a great software engineer? Hell no! BUT it tells your potential employer some things about you, that you should know some concepts that may be very helpful for a successful engineer. On the other hand, if you finished a Software Engineering course on an even better uni, is that enough! No no no! It is all about what you learned rather than where you went the past few years. You may use studies to your advantage, learn a lot, meet great people and truly become an expert pretty quickly. But if you do not take care of that yourself, why do you expect your teachers to pack knowledge into your head?

Friday, 29 January 2016

Soft Skills: The software developer's life manual - my perspective.

When I first got my hands on John Sonmez's book I wasn't quite sure if I was willing to start reading it right away. I was holding the book translated to my native language (Polish), and the title was like many other books on the topic of professional approach to software development. Directly translated it would be "Efficient programmer - work, earn money and gain skills." If this was what the book was actually about, it would just be one of many, even though I would still be interested. However, the English title is much more intriguing. Reading a lot of technical books on programming or other scientific stuff I was quite delighted to reach out for something related, yet much different.

I must say I am not a stereotype software developer, never really considered myself to be a shy person, I love giving presentations and talks, I like sports. But because these things are fairly natural to me, I thought it could be great to see another person's perspective on those soft skills. Especially if that author is one of the most respected tech speaker, writer, blogger and motivator. And he didn't disappoint me.

From the very first chapters (and there are many of those!) I noticed little things that I disagreed with. For example, I consider writing a daily report of what I did at work to be a waste of time, and I'd much prefer having some software tracking my technical progress. BUT, on the other hand, not only I agreed with most of the content, but I discovered many facts, tricks or approaches that I wouldn't think about myself. For example, I knew what is generally typical for bigger corporations, and how different are things that you are likely to see at startups. But I never envisioned those in a structured way. Little thing, but helps you understand what you'd like to do much faster.

I was also happy to see author's attitude towards owning a business. There are many books out there which are going to tell you "just do it! Running a startup is so simple and painless!". But if you ever ran a single project (not to mention a company) from start to finish you'd know that "motivation" is just bullshit. John Sonmez appears to be ready to tell you straight to the face that this is not going to be easy, but without demotivating you at all. Instead you get a bunch of advice on how to manage your time, which traps you should avoid and what you should focus on. I tend to be pretty cautious with listening to all "life how-to's"; after all, we often like something because we want it to be true, even if it is clearly not. But with this author it was much easier for me to believe him, as he successfully runs so many things on his own, and, paradoxically, because there were some things I disagreed with. (Am I the only one to get cauitious when I see a text where everything appears to be the way I like it?)

Some chapters appeared to be taken straight out of my story. I remember trying pomodoro out for the first time, and I felt exactly as it is described in the book. I also used to learn stuff the wrong way, by getting all the theory first, and then discovered my own system that works for me - and it is just like John's 10 steps! There are plenty of other stories that made me trust the author even more, because I experienced them on my own way before I read the book.

But let's not be too sweet. Like I mentioned before, I do not agree with everything in the book. I quite dislike the perspective of saving every penny for many years so that later you can live without... saving? It appears to be quite excessive, but the other way. (On the other hand, I am fully aware that without saving one will never gather much, and I loved many tips on finances!) Another thing is working overtime. I think I understand what it means to work hard for your goals, but working too much is costing you much more than you may gain. It is not only about your money, it's about your family, your body, your passion or motivation. And you may lose all of those if you fail to break when necessary. I also think we are animals, I don't really trust "scientific" research on motivation effects (as its conduct is often far from fair), and I believe we can't be sure if we actually have the free will (which is a story for another post.) But the author is not trying to convince me that everything in the book is the only right way - he's just the opposite and I like that a lot.

Through the chapters of this book I was on a sinusoid of agreeing and disagreeing wth John Sonmez on various topics. But if you are reading this and it makes you wonder if you should read the book, there is a simple reason why you must do it if you are a software developer: the author have been through things he is writing about. I am a younger person, hopefully just beginning my journey. I have my opinions on most (if not all) topics, and while some of those do come from my own experiences and skills, others are probably going to get clarified and matured. And even if after all of them are settled and I still disagree with John - it was definitely worth reading this book to get to know his perspective (now I know we disagree on some topics, at least!)

I am sure that some of the things that I read in the book will remain with me, and hopefully help me. It confirmed some of the things I knew and taught those that I had no idea about. It is informative, friendly, consequent but not aggressive, and I really do think this is a good software developer's life manual. Need to live my own life to be sure though!

Monday, 25 January 2016

Scientsts say...

I am an avid reader. I read many blogs, news-channels, books, articles and so on. If I have some time for a slow breakfast in the morning, I like to sit with a cup of coffee or tea and... check my reader app to see what news have arrived. And while that feed consists of topics including sports, world-news and business,  I admitt that most of the channels I follow are tech or science-related. And here comes a small paradox: the word "scientists" usually appear in categories other than science or technology. And most of such reads headlined "New research prooves..." or "Scientists have discovered that..." appear to be fragments of a story, full of plot-twists and action, but not scientific at all. Because what scientists say have somehow become one of the most powerful tools for pseudo-scientific discussions.

I am not trying to say that there is no real science today - I believe quite the opposite. I also disagree with opinions that "whatever science you hear on the news or the Internet is probably fake." But sometimes I am truly shocked how some well or not-so-well informed guesses become research in the headlines. And I guess cannot believe what "scientists say" quite most of the time.

One of the most important fundaments of science (at least in my opinion) is a possibility to conduct a knowledge-based discussion around any research published. If a new discovery in physics, biology, chemistry, psychology, sociology or anything related to gathering information is made, there are some important questions to be stated. How did they get the data? What was their reasoning process? Does the discovery make sense in the real-world complex (if applicable)? How did they do their experiments step-by-step? Because if scientists can answer those questions, there is a chance that their conclusions are right, they are doing science indeed. But if a discussion is based on opninons rather than facts, then science is gone pretty quickly - welcome politics.

Have you ever noticed how easily people believe in literally anything they read about "scientific proofs" of things they believe? If they like eggs, they will probably find some news on how eggs are great, and then they are ready to argue because some scientists say so. However, if anything made them or their friends dislike eggs, some researches are ready to tell them why eggs can be as dangerous as smoking. Need any more fuel to that fire?

On the other hand, if we disagree with some conclusions, we tend to simply reject them, no matter how much evidence is behind. Maybe that's why so many burger lovers will never accept if research on red meat's relation to cancer stated they shouldn't eat it. At the same time, you can bet that at least some of the carnivores would try to prove that you are wrong to eat eggs for breakfast - scientists said they are so unhealthy after all!

To make matters worse, some discoveries (especially those on diet or medicine, as those two appeal directly to most of us) appear to oscillate between some extremes. That opposite discoveries about eggs come every year or two. Quite similarly with milk (why it can be great and why it can be terrible), chocolate (pros may outweigh the cons, but you may outweigh yourself) or cheese (I can already see arguments over those risks not being worth the gains and vice versa.)

Another thing is that some people draw generalized conclusions from massively insufficient amounts of data. If I conducted a study on how coffee affects human body, and I had as much as 10 participants, all from my university, I would not make statements about caffeine in general. My results could be used to make an informed guess, if anything. And even if I grew my participant base to thousands, then conclusions would improve to well-informed guesses, but still guesses in my opinion. They could be forged into a data backed-up theory if I tested thousands of people from all around the world, different ages and cultures. To make an actual proof I'd need to show how body parameters of at least 15% participants or so had changed. And even that would still be a theory for some scientists, but it is really extremely hard, if at all possible, to make a formal, maths-like proof in medicine.

My point is not to criticise all research based on insufficient groups of people. But I do say that people should be aware if some data is enough to draw some conclusions or not. Scientists are usually pretty cool with their own results, and so should be people writing about those. If a research had shown that 5 out of 20 children at school X preferred blackboards over whiteboards, you wouldn't say that "Children hate whiteboard markers and want chalk instead!". So why shout "Orange juice causes obesity!" if there was a slight correlation between preference of juice taste and weight for 10% of tested people?

If you want to understand some research, check who made it (are they journalists, hobbyists or scientists?) and, most importantly, how they made it. Do you think they had enough data to make conclusions they did? Would you sign your name under such statements? And if not, can you put your finger on what makes you disagree? Is that a fact or just a feeling? Finally, what you should be aware of is that very few researches are definite and final. Even if a study is conducted by great, known minds, and even if the data they based on was most up-to-date and relevant, this does not necessarily mean their conclusions are true. Do you know how many different models of an atom were used in physics? Moreover, if part of some research is wrong, it does not mean that the whole study is worthless. Do you know how many models of an atom...?

Friday, 22 January 2016

Why statistics without context are rubbish.

As today's world is quite fast-paced and full of information streams, we hear tons of facts, opinions and bullshit everyday. And while maths is supposed to be strict and clear, because you can't really argue with numbers, it is often used in a terrible version of the last category. I often hear that "country X is so great, the average monthly salary there is like 10k USD!". Or even better: "Y% of our nation believed in party Z!". The fun fact is that the numbers themselves do not lie, unless people make them up. But the conclusions drawn from them are total crap, most of the time.

I do understand that numbers appear to be psychologically strong, when given a proper context. To paraphrase a quote from "The Little Prince" (one of the children's book that so many adults fail to understand): if I say "I saw a really expensive car today" nobody's going to be impressed. But if I rephrased myself like "I saw a million dollar car today", it would probably stir listeners' imagination quite more. (BTW isn't it a paradox that something as abstract and "emotionless" as a number can bring more emotions than a large bunch of descriptive words?) For that reason some people that want to appear smarter or present themselves as using cold hard facts juggle with statistics, diagrams and other professionally-lookin' data. But if you stopped just for a moment and analyzed them, you would probably discover they carried no information at all. The problem is that most people don't stop.

If you hear a politican saying that they are right to do whatever they want because "more than a half of society trusted us", what do you feel? Either a damn lot of people went to exericse their right to vote and most of them actually believed a single party or, quite probably, this "data" is complete crap. Let's say that 60% of people with the right to vote actually did it (and that would be a damn lot in this century.) If a party received 55% of all votes, how many people actually trusted them? And is it really "more than a half of the society?"

There is even more to the election stuff, because in many systems parties need to have at least a few percent of all votes to enter the parliament. That means that a single party may receive just 30 or 40% and still hold much more than half of all seats, as votes for parties that did not pass are not represented there. So if a party holds, let's say, 60% of the parliament, what does it tell you about how many people trusted them? Quite nothing, really, unless you consider how many people actually went to vote. It may turn out that a party needs less than 20% of the nation to trust 'em to hold a majority in the parliament. I am not going to get into politics, because it is usually far from logical (and why people do not exercise their right to vote is yet another story), but where is that "half of the society" again?

There are better examples of why context is king, however. And the most common statistical data that blows my mind is average salary. People must be rich when working for a company that has it as high as 10k per month right? Let's see. If that company earned a million a month, hired 100 people, and 10 of them were directors and owners earning 700k combined, how much would regular workers get then? Oh wait, it is less than 3,5k! I am not saying it is too little or too much. The only thing I do say is that "average salary" is nearly always complete bullshit, unless given a proper strict context.

On the flipside, I once heard the example form above being misused by a teenager trying to convince his parents that his grades being lower than class average mean nothing. Well, that would not really be true, as school grades are (at least usually) limited by a certain scale. And there are some top and bottom boundaries then the average actually tells you something. Such clear limits do not apply to salaries and lots of other real-world data, however, and "average" means nothing then.

What I am presenting here are very simple examples. So you may think "why do you bother writing this?" Well, I am surprised everyday by how many people, including scientists, engineers and other ones whose daily job includes working with numbers, are misguided by statistical data being interpreted incorrectly. Moreover, many journalists or politicans use statistics in the wrong way because they do not understand 'em themselves, but there are some people who want to mesmerize us with numbers, just to trick us. Just come on, in order to avoid being deceived by statistics we just need to remember a simple thing: context is always necessary, because reality matters.

Tuesday, 19 January 2016

From a tape, an eye and a pencil to artificial intelligence (Part 2)

The story about defining intelligence is yet to be finished and, as it appears, far from over. We started defining multiple types of it, like sports or social intelligence. And this is not, unfortunately, a different discussion. If we do not know what requirements our machines need to fulfil to consider them intelligent, then we are never going to finish arguing. But this definition of done here is also important for another reason - we need to know what we are trying to model with our machines.

Back in 1940s, so quite early for informatics, another model of computation was born. Threshold Logic, as called by autors Warren McCulloh and Walter Pitts, inspired a different approach: if we use our brain to think, maybe we should recreate that to build "thinking" machines? Pretty soon another researcher, Donald Hebb, suggested that we should consider plasticity to be the key of learning. And as Turing's approach was already known back then, people (including Turing) started mixing Turing machines with that brain-inspired computational methods. That is often considered to be the birth of Artificial Neural Networks.

In spite of an early spark of interest, the plasticity approach took some time to gain speed. It was not until late 1950s that Perceptron, a model of a neuron still used today, was brought to life by Frank Rosenblatt. Another 20 years went by until Paul Werbos described Backpropagation learning algorithm. That was still just the beginning of a very extensive research in neural nets that is still continued today.

And so it is 2016 now. Many different neuron models and learning algorithms have been created, massive amounts of data required to train our networks gathered and plenty of successful applications run on our machines. For example, we have neural networks able to recognize dogs on pictures and tell you their breed (better than at least most humans.) So here we go: if intelligence is an ability to gather some knowledge and apply it to new cases - we already have some artificial version of it! On the other hand, you would probably expect more from intelligent machines (even though the demonstrations are absolutely breathtaking for me as an information scientist.) After all, humans can do so many things, why can't those networks be alike? Well, that leads us back to "how many different types of intelligence we have" I guess. What we can't deny though is that at least some form of intelligence is achieved by our machines and algorithms today.

So if we consider neural networks to work pretty well, then are we done searching for AI? Absolutely not. It have been argumented by many that "this is how our brains work so we should pursue that direction", but I dare disagree. First of all, we do not really know how our brains work. Second, it is not always the best idea to bring out the big guns, and NNs may require exhaustive amounts of data for training (which sometimes is not even possible to gather!) Third, we only know that for some kind of intelligence neural networks appear to be a great model, not for just any problem. Finally, we already have some different approaches bringing good results as well.

It may appear to be entirely natural for us, humans, but detecting faces surely can be seen as some kind of intelligence. We have developed some classifiers that handle that very well! We use some clustering algorithms to help detect cancer. Some algorithms called support vector machines are used in financial forecasting. We can even use relatively simple mathematical tools like regression to forecast weather. All those applications can be considered to implement some forms of intelligence, because they include elements of reasoning: they use something they have seen before to make an informed guess about the future.

I am not getting into too much detail about how those different  (and many more others!) models were born because the point of this post is different. I wanted to show you that our computers, from simple calulators to even the most powerful super-machines, are all equivalents of a Turing machine (and actually quite imperfect ones, in some way!), and yet somehow people have managed to take that tape, eye and pencil to create aplications so complex and amazing that people can't differ them from humans by talking with them!

So are we far from building artificial intelligence? Or are we on the brink of discovering it? Or maybe we already have it and use it everyday? That weird journey through ideas and connections is not finished yet. Because hey, what is that intelligence again?

(The end)

Sunday, 17 January 2016

From a tape, an eye and a pencil to artificial intelligence (Part 1)

The 21st century is full of big titles on how we built intelligent machines. New robot to cook you some dinner. A car that drives itself. A system that knows what movie you wanna watch better than you do. And pretty much every year or two you can hear claims that we are on the verge of discovering real artificial intelligence. But what is intelligence on its own? And did our algorithms reach it already? Let's take a brief journey through the origins of humans' attempts to create thinking machines.

In early 20th century mathematicans were trying to find the core of mathematics, the very fundamentals which can be used to derive all the rest. They struggled a lot, because when they already nearly agreed, after lots of conflicts, that arithmetics is the root of all maths, there came the set theory to ruin it all. They were not able to crunch it down to arithmetics, so they decided to try to reverse the problem and express arithmetics with set theory stuff. That is yet to be finished...

When in 1936 Alan Turing presented his paper On Computable Numbers, with an Application to the Entscheidungsproblem, there was no "information science" or "computer science" yet, at least officially. And if even today, after so much development in those areas, artificial intelligence is still pretty fresh, new and undiscovered, how could people possibly think about it back then? Well, they did. They did a lot. And it is actually how it all started.

Turing's approach was kind of revolutionary because instead of trying to find connections and relations between different parts of mathematics, he imagined a simplest mathematican and what they could do. Simplest piece of paper to write on? Let's get a tape divided into single-sign cells. Pencil to write on that tape? One that can write a single sign at a time. How to read all that? Let's get an eye which can read a single cell from the tape at a time. The only things that our mathematican does are read a sign in the current cell, write something there and move one cell left or right, following a strict procedure. That's it! Our mathematican can be a machine!

As you may expect, some of the scientific society disagreed, or even felt offended. Did you really expect that such a thing would solve problems like we, intelligent creatures, do?

Well, it does. Or at least, we have some proofs that it computes pretty well, and nobody could proove that it doesn't do that universally. Even though the Church-Turing Thesis, which can be simplified to "Every intuitively solvable problem can be solved by a Turing machine", cannot be proven (because what is intuitively solvable?), that abstract Turing machine remain the very basic model of a computer until today.

Back to artificial intelligence - we are trying to use computers to run algorithms that can adapt to certain situations and provide desired results for inputs they were not explicitly prepared for. And computers are some implementations of universal Turing machines... So wait, am I trying to say that a limited eye, pencil and some tape, along with a few rules are enough to create something intelligent? Well, the answer is the most frustrating one: it depends. Because what does intelligent mean?

(Part 2)

Friday, 15 January 2016

Humanistic science.

Being a software engineer and science freak in general, I quite like numbers. But it has not always been like this. I used to truly hate maths and everything related. It appeared cold, brutal, without any content or emotion within it.

Before it was too late for me, I dug deep into informatics, computer science and all information technology in general. I started rediscovering maths again, from an entirely different perspective. Mathematics as a part of this world, a pretty universal language for describing things. It started to fascinate me, even though I've never been one of those naturally talented people that just look at a theorem to make it prove itself.

I learned a lot about programming, engineering, building things in general. After some time, I found that something that I used to hate have become my greatest passion and fascination. Information science, computations and all that stuff - I really got into it.

Now I am a software engineer. I like building systems, writing code, applying working methodologies. I am also a "do-it-yourself scientist", ready to conduct some experimental computations on my own. Books, videos and podcasts about any sciences are pretty much for me, and I am always interested in learning new stuff.

So what is this all about? Well, my perspective on numbers is, as I discovered some time ago, quite different from the common one. Maybe it comes from my past hatred against mathematics in general, but I feel like a science-humanist, so to say. What do I mean by that?

I try to see the world as numbers. I try to understand the information that is running inside and around us, from tiniest particles to spacecrafts, from protein folding to stock market analysis, from simplest procedures to getting into our brains. Information is everywhere, but seeing it this way does not make the world easier or poorer in any way.

While there are some certainly complicated procedures we pretty much understand, like some aspects of evolution, others remain mysterious and undiscovered, even if some "scientists" say otherwise. Because what are emotions? Nah, what are thoughts on their own? What is the essence of thinking and feeling? Or maybe the right question is is there anything like that?

I am not trying to say that maths is hopeless when it comes to humanism. Just the opposite. On the other hand, I am the last person to say "emotions are just some chemical reactions in your brain", which I find quite ignorant. What I am interested in is discovering how things that we consider to be humanistic or natural are built on some scientific foundations. And I like to dig deep, so I quite often get to philosophy, rather than pure fact-driven science.

What I want to write about here is pretty much everything related to numbers that I find interesting. I hope there will be some programming, computations or methodologies. I want to throw in some statistics (and why some of those are useless) and probabilities. I want to share the stuff that I come across and become fascinated with or just the opposite, find it misguiding or just wrong. And because I like to see the world as numbers, everything can fall into that "stuff" category.

If you are still reading this, I sincerely hope it is going to be worth it.