Saturday, November 15, 2014

Why are we here

I have recently given a talk called Why are we here at an internal event at my company. Since I think it summarizes well my approach to work I would like to share it with the world.

TL;DR

This is not about the purpose of our existence on the planet Earth, but about why do businesses keep programmers on the  payroll, you probably will not like what you read, you will be uncomfortable but (hopefully) it will make you think about your work  in more business way and also be more agile (I know, I know).

Why are we on the payroll

All businesses have one goal: to make money period.  That means earning more money than they spend. Therefore, you are only useful to the company as long as you are also earning more many than you cost (I know I am making oversimplifications, but this is just to make a point, you can stop the flames, thank you). So, the only reason that you are on the payroll of your company is that someone, somewhere either knows or thinks that it's true and you are bringing more value that you get paid. What this means is that you need to be as efficient as possible to actually deliver on that promise.

The first thing I heard on my new job

I started my current gig on April 1st 2009. I actually have a thing for starting jobs on the 1st of April. On my first real job I worked for about 2 months without a proper contract. Towards the end of the second month I was seriously considering whether or not this was a huge April fool's joke on me. Happily, it was not. So, anyway, the thing that I heard on my entry interview at my new job was: you are not hired to write code. And an alarm went off in my head, screaming: WTF?!??!??! I have 5 years of commercial experience writing software, and they tell me I am not here to write code??? Have I just made a huge mistake? What followed was this: you are hired to solve problems. Business problems. And that hit the nail on the head: we, as programmers, are meant to solve business problems. The fact that we are most often doing it with code is just a side effect. If you are able to solve a problem with Excel, do that in Excel and don't write your own custom software to create diagrams from csv files or whatever the case may be. 

You are not your code

How ofter you have the experience like this:
i.e.:
  1. browsing through some random code
  2. notice a seriously messed up crap
  3. FFFUUUU
  4. git blame
  5. it's my code
I have that every other day. It means a couple of things:
  1. I am developing, because I would not write a code like that now
  2. makes me humble, I make mistakes, a lot of them, and this is a proof
  3. that code works in production and delivers value for some time already
The point is: you are not your code. All of the SOLID principles, software craftsmanship, deisgn patterns and all are important. But what beats them is: delivering business value. You should strive to have beautiful code that delivers value, but if you have to choose, optimize business value. In the longer run this is what business evaluates. Perfect code that sits on the shelf and is never used, brings zero value and is actually just a cost. Actually, on that point, all code is a cost. So the less you write to solve business problem, the better. Just make sure that you do solve the business problem. 


Lines of code

What all code has in common? (With the exeption of extermely short pieces of code) it has bugs. The more code, the more bugs. Therefore each line of code that you write is a liability, not an asset. Think about it as a debt to the universe. You need to take that debt to solve your business needs, but don't take too much of that debt, because you will go bankrupt. Most of you (I hope) are not evaluated based on the number of lines of code that you write. I sincerely hope that you are evaluated on the number of functionalities delivered or business problems solved, not lines of code. If that is not the case, you are at a wrong place. 
Most valuable pieces of code that I have seen are usually utter crap to read, and even more difficult to maintain. But they work for years in production without people needing to touch them. So, count problems solved, not lines of code.

Development

By which I don't mean software development, but personal development. You have to develop your skills throughout your entire career. We have chosen a career of constant learning, till you retire. This is actually true for all careers nowadays, but it especially evident in software engineering. New tools and technologies (databases, languages, cloud, etc) appear every single day. We constantly need to learn new tricks and be up to date with the stuff we are using every day. If I used just the skills I learned in university, I would be out of a job right now. Those skills are mostly useless. I did not use java, knew nothing about agile, did not know git, svn... The list goes on and on. And you can wait for your company to train you. I am sure they will. But only when they see that you are almost useless without a particular skillset. So, if you want to act like a responsible adult, you should actually be proactive about that and do it yourself. There is a lot of free courseware available online, free lectures from MIT, Carneggie-Mellon, coursera or Khan academy. You can find plethora of information on any topic available online. You just need to take advantage of this, and train yourself. Note that this trainign needs to be beneficial to both you and your company. It needs to lead in increases in (you guessed it) profit (more efficiency, better design, less bugs, you get the gist). 
Recently, many books have been published on the motivation of the people doing cognitive tasks, such as drive. You can also watch the video to get the gist. Research shows basically, that the "carrot and stick" method does not work for people doing cognitive tasks at work. What does work is: autonomy, mastery and purpose. For the autonomy and purpose, you will have to figure this out on your own, but for mastery, I can recommend contents of a couple of books:
  1. Pragmatic programmer. Even the title says it all: "The pragmatic programmer. From journeyman to master". If you are only just starting, read this book. It has all the right tips for beginners and should be a required reading for CS students. If you have experience, you will find a lot of this obvious. Bare in mind that it was not all that obvious 5 or 10 years ago for you.
  2. Code Complete 2nd edition. This is the ultimate book on software construction. IT is lengthy but very well worth the read. 
For the java folks also these two are required:
  1. Effective java. A bible for anyone using java the language. 
  2. Java concurrency in practice. If you are writing concurrent programs (and we all are), you have to read this book. 
You work 40 hours a week. This is about 35% of your conscious time. And this is the aspect of life, that your livelihood depends on. Invest in it! And if you treat it as an investment, follow the advice of the financial investors, do it often and regularly, make it a habit. 
Reading a technical book does not take a long time. You can alternate between fiction and technical books. You can subscribe to RSS feeds of some technical blogs, you can listen to podcasts on the commute. My point is: there are a lot of ways, in which you can learn, using the time you have. Do it.

Stay up-to-date

You don't need to try out every new piece of technology all the time. It is good to read up on the new stuff to be aware of its existence, and what are good use cases for it (e.g. hadoop, javascript frameworks, clojure or other new JVM based languages). I tend to read technology radar, attend conferences or just read some RSS feeds for new stuff. I think that you need to watch two streams of data:
  1. the stuff that supports you right now. For me that is java ecosystem and postgres. I subscribed to a number of feeds from dzone, plus planet postgresql. This keeps me up to date with the stuff that I am using day to day.
  2. new stuff. The stuff that you are not using (yet?). Again: a couple of feeds from dzone, some random RSS stuff on python, nosql, hadoop etc. This brings serendipity. From time to time you should discover things that are useful to you in new problems from this stream. 
You can use G+, twitter, RSS, whatever. Just try to stay at least somewhat up do date with what is going on in IT. 

You should also stay up to date with your business context. A lot of the time, there are huge benefits in changing processes rather than tools. And engineers are good at optimizing things. So you can be a hero for just changing a process and not code. 

And please don't become a trainer of white transsexual rhinos (trademark of one my friends). If you are only a batch process engineer or a webservice developer you will be reduntant once that need is gone. Try not to get boxed and don't box yourself. Never label yourself that, be a capable software engineer that can solve any problem. That is what ultimately gets you job security.

Crisis will come

Whether you like it or not, I believe that the compenstation level in IT in not going to last. I think that the current situation is a speculation bubble created by large demand on the market. People that come just out of school may not realize that immediately, but I still remember how hard it was to get a job in the peak of the bank crisis, when all banks laid off a lot of people, who were all looking for a job. If you follow the advice above, it will be a lot easier to switch jobs, you will have up do date knowledge, you will know tools that help you solve a large variety of problems. You should be a perfect candidate for any gig. And you should also have the possibility to take a pay cut for some time at least. 

Think about your future, chances are you are not going to be working in the same place in 10 years. At the very least, you should be able to answer youself the question: what do I want to do in 5 years? When you know the answer to that question, you should create some rough plan on how to get there. 

eVALUEate

I like the English origin of that word. Polish counterpart comes from the word "price", which is missing the point. The reason people get hired and fired is sometimes the price (as was with massive outsourcing to India), but more often will be the value that you get for a dollar spent on the salary. You should optimize the value that you bring. As a though experiment: think about how many products does your company have to sell (or how many customers have to pay their bills, or whatever is the income source for your company) in order to pay you. And then think, if you are bringing more value. 

Programming is not about typing

it's about thinking. So, first, solve problem, then write code.

Thursday, September 26, 2013

Pidgin-sipe updated to 1.17.0

Changelog:
* New upstream version 1.17.0 "Lync 2013" (2013-09-21)
        - Feature #62: Support for Lync 2013 Unified Contact Store (Stefan Becker)
        - Feature #59: Support for Lync 2013 Persistent Chats (Stefan Becker)
        - Fixed #211: Status "away" or "busy" incorrectly mapped to "Invisible" (Michael Lamb)
        - Fixed #209: group chat doesn't like HTML (Stefan Becker)
        - Fixed #200: OCS archiving system blocks audio/video connection (Jakub Adam)
        - Fixed #187: Duplicate messages in group chat (Stefan Becker)
        - Fixed #184: Duplicate users showing in Group Chat (Stefan Becker)
        - fix EWS autodiscover for Office 365 (Stefan Becker)
        - add support for group chat history (Stefan Becker)
        - add support for buddy photos on Lync 2013 (Stefan Becker)
as usual, you can get it at:
https://launchpad.net/~radaczynski/+archive/pidgin-sipe/

Thursday, July 25, 2013

Pidgin-sipe updated to 1.16.1

Changelog:
* New upstream version 1.16.1 "Bug Fixes I" (2013-07-13)
        - Feature #66: Windows DLL version information (Stefan Becker)
        - fix call failure when host has multiple IP addresses (Jakub Adam)
        - fix buddy list handling after moving to Lync 2013 (Stefan Becker)
          * Lync 2013 migrates buddy list to Unified Contact Store (UCS)
          * NOTE: modifying the buddy list is *NOT* supported yet!
        - crash fixes for new HTTP stack (Stefan Becker)

get it at:
https://launchpad.net/~radaczynski/+archive/pidgin-sipe/

Tuesday, July 23, 2013

Spatial indexing in mongodb

I don't really know when it was, added to mongodb, but it seems that not only mongo supports more geometry types now, but it also supports spherical calculation of predicates (intersection, inclusion, distance) on spatial data:
http://docs.mongodb.org/manual/core/geospatial-indexes/

The supported types (as of now) are:

  • point
  • linestring
  • polygon
So for any composite geometries (multi-* or heteregenious collections) you would need to have a 1:many relationship and index on geometry parts. Since mongo supports only intersection and inclusion as predicates, these also work well for the parts (if a part of geometry intersects predicate, the full geometry also does; if all parts of geometry are included, full geometry is included), it seems that it is a good fit for a large part of GIS applications. 

Tuesday, June 25, 2013

Pidgin-sipe updated to 1.16.0

Changelog:
        - Feature #58: Implement Digest authentication scheme for SIP Proxy Authentication (Stefan Becker)
        - Fixed #196: Useragent value not forwarded to core (Michael Lamb)
        - Fixed #193: Pidgin Status changes stop working (Stefan Becker)
        - Fixed #186: Users appear offline when they are not (Stefan Becker)
        - fix kinit-less use case with krb5 >= 1.11 (Stefan Becker)
        - rewritten HTTP stack from scratch (Stefan Becker)
          * cleaner, layered and hopefully less error-prone implementation
          * HTTP stack internals no longer exposed to user code
          * reduced network traffic and less SSL handshakes by utilizing HTTP/1.1
            connection keep alive for multiple HTTP requests to the same host
        - switch purple backend to deferred destruction approach (Stefan Becker)
          * Pidgin should no longer crash at connection close, even in corner cases
        - add menu entry to make a call with a phone number (Jakub Adam)
        - some progress on telepathy backend (Stefan Becker)
          * add TLS certificate accept/reject user interaction
          * add "Single Sign-On" & "Don't Publish Calendar" account options


get it at:
https://launchpad.net/~radaczynski/+archive/pidgin-sipe/

Sunday, April 7, 2013

Pidgin-sipe updated to 1.15.1


Built with video and audio support, for precise, quantal and raring.

Get it at:
https://launchpad.net/~radaczynski/+archive/pidgin-sipe

Changelog:


        - Fixed #190: SIP 407 response rejected with invalid message signature (Stefan Becker)
        - Fixed #189: Adium SIPE plugin vs. libpurple linking issues (Michal Lamb)
        - fixed free-after-use issue that caused crashes for some users (Stefan Becker)
        - fixed broken NTLM fallback in Negotiate (Stefan Becker)
        - fixed subscriptions expiration by subscribing again after re-authentication (Stefan Becker)
        - allow different user name and login for Office 365 authentication (Stefan Becker)
        - add SIPE version & git commit ID to debug log (Stefan Becker)
        - added valgrind log analyzer script (Stefan Becker)
        - added NTLM message anaylzer (Stefan Becker)
        - updated translations: Hungarion (hu), Romanian (ro)
        - updated Adium port (Michael Lamb, Harris P. Kauffman)

Saturday, March 23, 2013

Pidgin-sipe updated to 1.15.0

Built with video and audio support, for precise and quantal.

Get it at:
https://launchpad.net/~radaczynski/+archive/pidgin-sipe

Changelog:

 - Feature #3578135: Support Kerberos for HTTP(S) authentication w/o SSPI (Stefan Becker)
          * effective for all platforms that support --with-krb5
          * this triggered a series of cleanup & simplification changes and
            functionality & memory leak fixes in the sip-sec modules
          * special thanks to Jarek Polok for the logs and testing
        - Feature #3594094: Add HTTPS to autodiscover probe (Stefan Becker)
        - Feature #3607040: Simple button to disable calendar integration (Stefan Becker)
        - Fixed #3603228: Crash on 1.14.1 when connecting to server (Stefan Becker)
        - Fixed #3604671: sip uri with apostrophe is not valid (Stefan Becker)
        - fixed HTTP redirect crash (Stefan Becker)
        - unified Single Sign-On handling in all places (Stefan Becker)
          * if SSO is enabled then "Login" & "Password" settings are ignored
          * SSO is now off by default for new accounts
          * NOTE: if you do *NOT* use SSO, then be sure to disable it in the
                  "Advanced" tab of the account settings after updating!
        - added implementation for HTTP "WWW-Authenticate: Negotiate" scheme (Stefan Becker)
          * effective for all platforms that support --with-krb5
          * it will try Kerberos first, then fall back to NTLM
          * valid Kerberos Single Sign-On setup will be detected automatically
          * setup for a mixed Kerberos/NTLM HTTP environment:
            - login name:     DOMAIN\account
            - password:       domain password
            - authentication: Kerberos
            - Single Sign-On: OFF(!)          (see above)
        - enabled TLS-DSK support in Windows SSPI version
        - TLS-DSK: don't ask for password if SSPI or Kerberos are compiled in
        - Farstream 0.1.1 compatibility fix (Jakub Adam)
        - support conf:sip: meeting URIs (Jakub Adam)
        - updated Adium port (Michael Lamb)