studies

Get Computer Science Crash Course with Imposter’s Handbook

THE IMPOSTER'S HANDBOOK

I just finished reading Rob Connery‘s book Imposter’s Handbook. It’s a very good high-level overview of Computer Science concepts that you may not encounter in everyday job. It is also a good guidance for “what I should know”.

If you do not have CS degree I recommend you to check out this book. You can skip chapters about concepts that you are familiar with. If something is new to you – this book will provide you nice introduction to the topic, which you can later on dive in on your own.

If you do have CS degree, I still recommend you to at least check out what’s there. I’m sure you will learn something, or at least refresh your knowledge.

Check out hacker news discussion!

Do you have CS degree or you are self-taught programmer?


How to become a better programmer/developer?

developer

From time to time I receive emails with questions “How to become better/awesome developer?”, “Should I go to college?”, “what’s the secret formula to become ultimate programmer?”. Instead of answering the same questions over, and over again – providing only partial response each time – I decided to write this blog post.

Should I go to college?

College lecture

It’s a very hard question. Especially from perspective of person who went to 3 Universities (and graduated from all of them). Thus, instead of telling you whether you should or should not go to College, I will tell you what are the benefits of going to College.

First, and foremost – the opportunity to connect with other people. Better the school is – better connections you can make. This is the real value of going to Harvard or Stanford instead of Community College. Not outstanding professors who owns secret formula that they are sharing only with their students. Of course professors at top Universities are usually better than at non-top Universities, but they do not have recipe to teach you something without your own initiative. Did you know that Stanford, and MIT publish some of their classes online, for FREE? Why you do not just study these classes instead going to college? You can, but this is like watching the moon landing from home instead of being in the space craft. This is also the reason why top schools accept only ~2% of candidates. They want to have only the smartest people to hangout together, and then have successful careers. This makes school prestigious.

The second benefit is being forced to learn things that have steep learning curve, are not very fun at the beginning, but are definitely worth to know while being developer. Most of them are actually very exciting when you connect all pieces together.

Information, knowledge, wisdom

Check out my other blog post: 10 things you should learn at University.

When you will have opportunity to choose classes to attend – first choose professors, then subjects. From my experience – when I wasn’t interested in some topic, but professor was good – I liked the class, and I learned a lot. On the other hand – when I was very interested in some topic, but professor wasn’t great – I always regretted, because I probably could have learnt more by myself.

Before making your decision, get familiar with opinion of people who recommend you to go to College (e.g., Joel Spolsky), or with those who definitely tells you to do not (e.g., DHH). You should also take into consideration path of those who went to College, and drop (e.g., Bill Gates, Steve Jobs, Mark Zuckerberg). Be aware that educational system has its issues that are amazingly explained by Sir Ken Robinson in the most watched TED talk ever Do schools kill creativity?, and Peter Thiel in one of interviews. Remember that university education is not life insurance policy. It may work exactly opposite.

I do not remember who said that, but I agree:

The best programmers learnt Computer Science at School, and programming by themselves.

What language should I learn?

Programming Languages

Most of experienced programmers will tell you: “whichever is your favorite, because you can do cool stuff in C#, but also in Ada, e.g., by writing Software for Boeing 787”. And they are right! But I feel sorry for those beginners who will try to start with Ada, because it is very likely that at the time when they will be getting their first program to compile, those who had chosen C# would already have full CRUD application with Database deployed on Azure.

My answer for this question is: learn C# and JavaScript.

Why C#? “C# is a better Java”, and those two (C# and Java) are currently the most popular compiled programming languages. Thus, there are a lot of code samples, tutorials, and community support.

Why JavaScript? Because it is the most popular programming language that allows you to write programs for the most popular platform: web browser.

Extra credit: learn also C/C++ to learn pointers, and how memory allocation works. I would even recommend you to try to write some assembly: to understand how variables are stored in the processor registers, and memory. Then spend 7 weeks with this book: Seven languages in seven weeks. Hint: after you learn first programming language, learning each next will be getting easier. There is also a great, GREAT book that will help you to understand how computers work: The Elements of Computing Systems.

You may hear from more experienced programmers that you shouldn’t try just learn another language, but to build something. Unfortunately, the difference between you and them is usually number of the languages you both know. You: 1 or 2, them: more than 5. Because of that, they are able to pick up language basics in one night, and start building something right a way. They already know how to use common programming constructs – such as loops, functions, classes – and how to use them efficiently. For you: it would be much harder.

It’s good to be proficient in one language, and know how to use a few other. I think it was Albert Einstein who said:

Know everything about something, and something about everything.

How to get a job when I do not have any industry experience?

first interview

Create something. Whatever. Really! That’s the most popular advice from experienced programmers. While it’s true, the problem is that it is much easier to say and understand, when you already have done that. For somebody who is really entering the market for the first time – it is not that obvious. So, here, I will tell you what to do: Create a website that will allow you to browse, add, edit and delete books. Then add possibility to login, and roles for admins (who can do everything) and standard users (who can only browse books). Once you have this, create a mobile app that will allow you to browse these books like the website, and later on, also edit/delete when you are logged in as admin. You can get books from your website by creating API that will return data in JSON format.

What technology to use? You can do it in ASP.NET MVC using MSSQL Database (with Entity Framework). You can also use Node.js with Express Framework, and MongoDB database. On top of that you can use some SPA Framework like AngularJS, ReactJS, or Aurelia, to make your app more cool. For mobile app – Windows Phone is the easiest for beginner. You can also try iOS or Android if you want to. The best move would be of course to implement it for all 3 platforms. You can create native apps in C#, Objective-C/Swift, and Java, or you can use Xamarin (C#) or Apache Cordova (HTML/CSS/JavaScript).

BTW: You can learn all technologies mentioned above at Pluralsight. I really recommend you to get an account there. You can check popular courses list as a tip what it currently hot and worth to learn.

When your app is ready, publish it on github, and deploy to Azure or AWS, or Google Cloud, or to all of these platforms. Use FREE trials if you do not want to pay, or even better – figure out how to do not spend too much money when using Cloud.

Are you done? I hope you didn’t do it exactly how I said, or you did multiple versions of slightly different applications using different tools. Great! Now, you can show it to your future employer, and tell him that you are already capable to deliver software from your first day at work. You can put it in your resume, in ‘projects’ section, and describe it: “I created a website for book collection management with user authentication, and authorization. Additionally I created companion mobile apps for 3 most popular mobile platforms (iOS, Android and Windows Phone) that communicates with database through RESTful API”. If you will have thing, when you graduate from Collage, you will already beat 95% of other students, and – I am assuring you – this will give you your first job for 99%. From then – you will figure things out!

If you want to work for some of the top, tech companies like Microsoft, Google, or Facebook, I recommend you to learn a lot about algorithms. Take as many algorithms classes as possible at school, read books (1, 2, 3), and practice, practice, practice. These companies don’t care whether you can program in Java, even if you are applying for Java Programmer position. What they care about is whether you are smart, and can get things done. I really recommend to check out Sean Lee’s talk How to Get a Job at the Big 4 – Amazon, Facebook, Google & Microsoft – it’s not only about getting job at particular companies, but it’s also a great career advice.

How can I improve my coding skills?

coding

Write code. A lot! Really. Write code everyday. You can create some simple applications, like todo list, or shopping list app, or personal finances calculator. I know all of these exists, but you are going to learn by reinventing the wheel. If you want to create something more complex – go for it! Look at this women who built 180 websites in 180 days. The good way to practice programming is to compete in programming contests.

Read books to learn from more experienced programmers, and to discover what we know about programming today. If you want some reading recommendations check list of my favorite books, or all books I have read.

Check out podcast Be a better Developer in 6 months by Scott Hanselman, and article by Peter Norvig (Director of Research at Google) – Teach Yourself Programming in Ten Years.

You can also take a look at Google’s Technical Development Guide – recommendations and resources that will help you to become developer from Google.

Get Involved!

get involved

There is an amazing, free Pluralsight production by Scott Hanselman and Rob ConneryGet Involved! Check this out. Then start a blog, create twitter and github accounts, subscribe to some podcasts (e.g., Hanselminutes, .NET Rocks, This Developer’s life, StackOverflow podcast), and go to some conference for developers, local meetup, or Code Camp. Pro tip: when you want to learn something – submit proposal for local meetup, student Computer Science group, or conference about the topic that you are interested in, and would like to dive in. This will give you motivation to learn.

Remember about soft skills

soft skills

What many developers underestimate is the value of soft skills. Please read Dale Carnegie’s How to win Friends and influence people, and Chad Fowler’s The Passionate Programmer. Maybe at the very beginning of your career it doesn’t matter that much, but at some point you will notice how important is communication, and ability to interact with people.

Summary

I know you would like to be an awesome coder tomorrow, but this takes time. Be patient, work hard, and after some time you will realize that you are a good programmer. However, remember to maintain and improve your skills everyday, like athletes do with everyday training.

Good luck!

Wolf of Wall Street


10 things you should learn at the University

I graduated last year, and I would like to summarize things I learnt. In the StackOverflow Podcast #36Eric Sink said: 

The best students learn Computer Science in class and programming on their own.

I remember when back in days my friends from the University were talking about their first job, and 9/10 of them were saying something like that: “During this one month Internship I learnt more than for 3 years in College”. I couldn’t say that about my job. At the beginning I thought that they probably got much better job or internship than me. It took me 3 years to understand this phenomena…and it wasn’t phenomena. They thought, they learnt a lot, because they were able to get something done using some framework that did magic in the background (like creating simple CRUD web application with database configuring everything automatically). However, there is a lot of stuff between framework and hardware. I noticed, that lot of Developers don’t care about it. Moreover, you can live without it. Like taxi driver doesn’t need to know the city, as long as he has GPS. I think it is good to know the fundamentals.

There are some courses, which can help you to learn things, about which you probably will not bother once you get a job. In the same time, they are worth to learn, will help you to understand how computers work, and in my opinion will help in your future job.

Here is my top 10 things/courses you should learn at University (which is the best time for it):

  1. Computer Architecture: to know how computer works, how they represent data (Two’s complement system, IEEE 754). There are two books good books about that: Computer Architecture: A Quantitative Approach and The Elements of Computing Systems.
  2. Compilers: sort of supplement to computer architecture. It is connector between Software and Hardware. Classic book about compilers is Compilers: Principles, Techniques, and Tools (AKA Dragon Book).
  3. Algorithms and Complexity (O notation): this is hard and challenging topic. Require a lot of practice, but pays off in the future. The bible for algorithms and computational complexity is Cormen’s book: Introduction to Algorithms.
  4. Automatas (DFA, NFA, Turing Machine, etc.): “Recognizing the strings in a language is a formal way of expressing any problem”. This is fundamental of Computer Science, as a Science, on top of which all software and hardware is built.
  5. Assembly Language: it helps to understand concurrent applications, and bugs occurring in them e.g. caused by instruction reorder.
  6. System programming: in the world of Cloud Computing and Virtual Machines, this is still useful subject that can gives you an insight into how software communicate with the hardware.
  7. Embedded devices: the Internet of Things is the future. Additionally it is fun (check Jon Gallant blog post who joined Internet of Thing team at Microsoft).
  8. Artificial Intelligence: every year devices are more intelligent (from your phone, through medical devices to Google Car). According to Bill Gates AI will explode in next 10 years. University is great place to learn AI fundamentals.
  9. Computer Networks: it is good to learn about networks, how data is flowing in the wires (packets), what is DNS, CDN, what challenges, and limitations do we have in fast and reliable data exchange. Recommended book: Computer Networks (by A. Tanenbaum).
  10. Computer Security: everyone would like to be a hacker. First, you need to know the basics, and be aware that this topic is changing every year (sha1 is being replaced by sha2, because it is not “secure enough” anymore). Because it is changing so fast, there is no universal book that is up to date. However Practical Internet and Unix Security book is still very valuable. To be up to date with security issues, I strongly recommend you to follow Troy Hunt’s blog (in my opinion: one of the best blogs in the Internet).

One can say: “Turing Machine? Would I need it for something?…Probably not.”. But again, I am talking about Computer Science, not programming. You can live without that knowledge, and do amazing things. Like mentioned taxi driver, who can take customers from place A to place B. But…what he will do, when GPS run out of battery or GPS will be wrong? What if there are two streets with the same name? Maybe GPS will indicate it, maybe not. Additionally, good taxi driver knows which way is faster, and where he will stuck in traffic on certain hours better than GPS.

Very often we do not appreciate the knowledge gained at the University, but it helps us in everyday job in the same way like swimming and running helps the boxer in his fight.

What is cool nowadays, you can learn Computer Science online for free.

At the end, it is totally up to you if you want to learn about Computer Science, or just learn how to program. I think it is good to know both. What do you think? Would you add/remove something to/from my top 10 list?


Master of Science in Computer Science

After 1 year and 8 months of being a Graduate Student at Kansas State University and Research Assistant at SAnToS Lab Research Group I got my Master of Science degree.

Courses I took:

In my first semester as a Graduate Research Assistant at SAnToS Lab I was working on integration Bakar Kiasan with GNAT Programming Studio (using Python and PyGTK).

In Summer 2013 I started my actual research work, which is captured in my Master Thesis: A Model-Driven Development and Verification Approach for Medical Devices. The main problem of my research was to propose translation of AADL/BLESS models to SPARK Ada programming language. I created PCA Pump Prototype for BeagleBoard-xM platform, by translating already existing models (using translations developed by me), and performed verification (static analysis) using SPARK Verification Tools.

This is a video from my defense:

Unfortunately, QuickTime crashed 3 minutes before the end. Fortunately, you can catch up with slides.

I created additional video with PCA Pump Prototype demonstration. Pump is developed in SPARK Ada, and it runs on BeagleBoard-xM platform.

Patient Controlled Analgesia (PCA) pump is a medical device, which allows the patient to self-administer small doses of narcotics (usually Morphine, Dilaudid, Demerol, or Fentanyl). PCA pumps are commonly used after surgery to provide a more effective method of pain control than periodic injections of narcotics. A continuous infusion (called a basal rate) permits the patient to receive a continuous infusion of pain medication. Patient can also request additional boluses, but only in specified intervals. It prevents from overinfusion. In addition to basal and patient bolus, clinician can also request bolus called clinician bolus or square bolus.

My Master Thesis in PDF format can be found here. LaTeX source is available here.

I spent 2 years at Kansas State University (4 months as an Exchange Student, and 20 months as a Graduate Student). I had very good time and I learnt a lot. I really recommend to get Master degree from a different University than you get your Bachelor. Wroclaw University of Technology (where I got my Bachelor) is more practical. Graduates are ready to work at the industry. Kansas State is more theoretical and research oriented. I had an opportunity to experience both and I am very happy with that!


Medical Device Coordination Framework

Patient room - future

As a Research Assistant at SAnToS Lab I am working on Medical Device Coordination Framework. It is a long term research effort. MDCF is an implementation of Integrated Clinical Environment. There is many people involved in it. Not only from my University. There are folks from University of Pennsylvania and some other researchers who cooperate with us. My part of research is focused on code translation. You can call it Model Driven Development. The long-term research goal is to create a AADL/BLESS to SPARK Ada translator for Medical Devices.

Technologies

AADL stands for Architecture Analysis & Design Language. It is modeling language, which allows to describe hardware and software parts of the system. It can be represented in graphical and textual form.

BLESS stands for Behavioral Language for Embedded Systems with Software. It is an extension to AADL language. AADL can be extended by language annexes. BLESS is one of them. It is designed to prove embedded software/system conformance to specification. In other words: to verify the AADL model.

SPARK is a programming language and static verification technology designed specifically for the development of high integrity software. It is subset of Ada programming language. It contains all features of Ada, except:

  • Pointers
  • Exceptions
  • Aliasing between variables
  • All Concurrency features
  • Side effects in expressions and functions

However, it contains toolset for Software Verification, such as:

  • Examiner – analyze code and ensures that it conforms to the SPARK language; also verify program to some extent using Verification Conditions (VC)
  • Simplifier – simplify Verification Conditions generated by Examiner
  • Proof Checker – prove the Verification Conditions

I blogged about SPARK Ada recently.

Research background

The ultimate goal has a big scope. The goal is to deliver a platform, which allows different medical devices to work together. Moreover, there will be monitored and controlled by centralized system.

We use and create a lot of different technologies. From AADL, BLESS, DML to SPARK Ada, Java, through many other. Most of them are still under development. I work mainly with AADL, BLESS and SPARK Ada. The biggest challenge for me is to understand how AADL models should be mapped to SPARK Ada in real-World. Unfortunately, I cannot find some Open Source examples on github. Companies treat it as their intellectual property, and do not share it. More over, the AADL committee still did not decide how some AADL constructs should be mapped to Software. Thus, my role is to propose it (based on existing work).

There is an AADL to Ada code generator: Ocarina. It is written in Ada and it uses Ada features, which are not in SPARK language. However, it is a good point to start. Another resource I am based on is Aerospace Standard – Architecture Analysis & Design Language (AADL) V2 Programming Language Annex Document. It describe data types translation and base for ports communication.

The essence of AADL models is port-based communication. Usually implemented in publish-subscribe mode. It allows to interaction between different components of the system.

Sample medical device

To create code translator for Medical Devices, I needed some example of Medical Device. One member of our research group, Brian Larson created AADL/BLESS models of Patient-controlled analgesia Infusion Pump. This device, is used to infuse a pain killer. The dose can be controlled by patient. He also created Open PCA Pump Requirements. Document, which describe precisely functionalities of PCA Pump. My role is to develop AADL/BLESS to SPARK Ada translation schemes and translate existing PCA Pump models, to assure that translation makes sense.

PCA Pump

Research plan

There are many issues and problems to solve in this project. One of them is SPARK limitation. Besides excluded features mentioned above, SPARK 2014 does not support multitasking (yet). SPARK 2005 support it in some extent (with Ravenscar profile). Thus I use mainly SPARK 2005.

The plan is as follows:

  • Create AADL/BLESS to SPARK Ada translation schema
  • Manually implement working PCA-Pump prototype on BeagleBoard-xM based on Requirement document to find out possible implementation issues
  • Manually translate AADL/BLESS models to SPARK Ada, reusing code created during implementation
  • Create AADL/BLESS to SPARK Ada translator based on manual translated code

How it goes?

I started working on this project around 1 year ago. Most of the time, I spend on studying AADL, SPARK Ada, BLESS and Ravenscar Profile. I thought, I would accomplish much more. However during the process I faced a lot of problems and I had to Shave the Yak. First challenge was to run SPARK Ada code on BeagleBoard-xM device. In cooperation with Ada Core, we got cross-compiler, which works for its processor. It took around 3 months, because cross-compiler was under development. After around half a year of exploring, I came up with AADL ports translation schema (based on AADL annex document). Simultaneously, I was working on PCA Pump implementation (based on its Requirements Document). Most of it is described in SPARK Ada programming for ARM-based device(BeagleBoard-xM). It allowed me to better understand SPARK Ada development environment and create translation schemes for AADL packages threads. SPARK Ada development is much different than Java, C# or Python. After many hours spent on AADL/BLESS models analysis, I created mapping from BLESS to SPARK Ada.

For now, most of the work is done. Especially, translations schema. I have less than 2 months to finish everything. My plan is to refactor existing PCA Pump implementation and create final mock of code translated from AADL/BLESS models. Additionally I want to add implementation to some ‘translated’ part and apply SPARK Verification tools and AUnit tests. Finally, I will need to describe everything in my Master Thesis.

My thoughts so far…

Development for safety-critical systems is totally different, than creating Web or Mobile applications. My research adventure is very fascinating and allow me to discover new things everyday. It gives me different perspective of Software Development, which will be useful in the future. No matter if I would work for company producing Aircrafts or Space Shuttles. It will be valuable also for Web/Mobile Start-up in Silicon Valley or personal Mobile App. Finally I understand where UML and variety of Software Design Processes can be applied. Programming in SPARK Ada requires deep thinking and understanding about how every small part of the program work. There is no high abstraction layer, where calling some library function will do all work. It allows to understand what is underneath and how powerful languages like C#, Java or Python are.

If you are at the University now, I strongly recommend you to join some Research Group. Or at least talk to some of your professors and ask if you can do some Research-oriented project for him. No matter, if you are Graduate or Undergraduate student. If research topic is out of your comfort zone, then it is even better!

outside comfort zone