May 8, 2015 Book Reviews No comments
May 8, 2015 Book Reviews No comments
Along with reading technical books and books on investing I’ve decided for myself to read couple of Science Fiction books this year, actually 4 of them.
My list so far looks like this:
1. Martian
2. Ender’s Game
3. Dune
4. Hyperion Cartons
So far I’ve only read first of those, called “The Martian”, and I’m completely fascinated by the book. It is great! Houston, did you get that?
First of all book has nothing to do with “little green man” or unrealistic magic or anything sort of you usually see in crappy movies. This book is hard science survival novel talking about a man who was left alone on Mars after his team decided he is dead and had to rush to leave the planet.
I’ve been always interested in astronomy and the outer space. I even have small telescope at parents house and just recently used it to see Jupiter while having night barbecue there. Also when I was a kid I read few soviet era books on planets, including Mars.
So when I was reading the book it felt very well in line with scientific facts and hypothetical future Mars missions. And this is the best thing about this book. Other good thing, as per me, is that the book doesn’t have any side stories. So, no love stories or too long description of anything. Plus it has its humour and is written in a nice and easy to read way.
I would for sure recommend to read this book if you are any interested in similar stuff. At least it should be interesting for software developers and other technical people. My wife would probably not like it.
Hollywood is already filming a movie. See short teaser: https://www.youtube.com/watch?v=xRRgwYw4zds
Almost forgot to say, the book was available for free for a long time and it is how I found it by accident and downloaded for free. Not sure if I can still share it just like that.
From here: http://www.andyweirauthor.com/books/the-martian-hc/the-martian-el
Q) How did you feel when your original, self-published version of THE MARTIAN became a phenomenon online? Were you expecting the overwhelmingly positive reception the book received?
A) I had no idea it was going to do so well. The story had been available for free on my website for months and I assumed anyone who wanted to read it had already read it. A few readers had requested I post a Kindle version because it’s easier to download that way. So I went ahead and did it, setting the price to the minimum Amazon would allow. As it sold more and more copies I just watched in awe.
See the book on Amazon or buy it using my my referral link below.
March 30, 2015 Conferences No comments
Disclaimer: I’m white, straight, or better say cissexual, able-bodied, married man and I have a child.
.concat() is new web conference organized by local enthusiasts in Salzburg, Austria. I’ve decided to attend it mainly because it is relatively close to place where I live, it is not expensive and it had few big names.
Biggest of them, of course, was Douglass Crockford, author of “JavaScript: The Good Parts” and important ideological contributor to ECMAScript.
His keynote was mostly shortened version of the talks he usually gives on Javascript and programming in general. You can watch it online. Small difference was that in the end he showed some of the good parts that are coming in ECMA 6 standard. And definitely it is different experience to watch someone alive than watching video.
You can see complete schedule with descriptions here: http://lanyrd.com/2015/concat/schedule/
Next two talks were “Ain’t No Part Like a Third-Party Javascript Party” and “How Teaching Kids Made Me a Better Developer”. I enjoyed two of them for different reasons. First was quick run on all kinds of issues that can be caused by different JS libs in strangest possible ways. It makes you think how dangerous is the world for any code you want to deliver to be used by someone else. Second talk was entertaining and revealing on how kids question things that we take for granted. I’m sure if we trusted less what we write and really find why things work the way they work we would be better developers as well.
Next two I listened to were “Tonight We’re Gonna Code Like It’s 1999: Designing Responsive Emails” and “No RSVP Required: Asynchronous Messaging”. First one was just not for me. I never worked with e-mail templates and I wish I never will. All I understood is that e-mail templating is pain. Didn’t grasp anything useful for myself from that talk at all. Second was list a terribly boring university lection I wish I would have skipped for “Credit Card Walks into a Bar” jokes.
Lunch was good. Nothing too special, typical Austrian lunch, but this is a great plus for the conference.
“No More Tools” was all about the tools. Friend who came with me was expecting that this will be about ways to avoid using tools like VS, or avoiding burden of hundreds of JS libs. Instead it was a whole bunch of tools being recommended for all kinds of things. Although most of the tools make sense I don’t understand how this helps to avoid tools.
“Useful Performance Metrics” was actually useful as we have some performance issues in project I’m working on. Takeaway for me was idea of having performance thresholds that are nothing too specific but should make a team pay attention to performance should any threshold be crossed.
I also liked “Containerized Applications with Docker” very much. Docker is really great tool for doing lots of quick virtualization. Plus this was one of very few presentations with live demo. I’m really glad there are people who have stomach to demo live. This is really appreciated.
“The Meaning of Words” was a depressing talk. Or at least presenter advertised it in such a way. Maybe pace in which it was presented was slow and looked like presenter didn’t do any eye contact with the audience. But talk was about a better programming word. And there was some hope in it.
Then there was a round of lightning talks. But all of them were prepared beforehand. Some of them were quite good as people showed what they worked on. Some were ridiculous or absolutely hilarious as people tried to squeeze so much into 5 minutes. There was one person who tried to demonstrate LED board controlled by some JavaScript. I really wanted to see what it does, but unfortunately the person didn’t manage to control anxiety and things went out of control.
I intentionally mentioned that geek person. I think that introverts, real nerds are having hard time to get better conditions for themselves when it comes to careers and social networking. This leads us to “A Talk About Nothing” which wasn’t about nothing at all. It was about equality and diversity in technology industry. I really liked the way this presentation was delivered. It was a great performance. But I have some disagreements with contents. Lets start with some questions. Are women underrepresented in tech? – Yes. Are women less interested in tech? – I guess, yes. Isn’t it logical that less women work in tech? – Work it out for yourself. I’m of opinion that this is logical. I would honestly like to see more women developers.
I’m of opinion that representation in tech should be proportional and not influenced artificially. Though we should encourage everyone. Should there be more gays and lesbian in tech? Sorry, I use my privilege not to care. I simply don’t want to know if someone is a gay. What does it have to do with tech skills? Should things we do be not discriminating and working well for all people, including disabled. – Of course.
To be honest, I think it is in human nature to care more about self and self-alike than others. Isn’t it how people evolved and survived? I’m convinced that people should tolerate each other and be completely aware of inequality and different minorities and respect them, but I also think that nothing should be taken to any extreme level. In a sense that tolerance has its limits. Would you tolerate a guest who does a mess at your home? Every stick has two ends. Don’t get me wrong, I’m all for my daughter being software engineer who lives in a better world where she can travel the world and see no poverty or inequality and where women are equally represented everywhere, but I’m not happy about the world where doing crap to your body or weird behaviour is considered normal.
Unfortunately some feminists will say that I’m just another “wrong” person. That’s why I put that disclaimer at the top so it is clear who wrote this post so in case you are one you can ignore my thoughts.
Overall, conference was very good. I will seriously consider to attend concat 2016 should there be one. I will do better home work on presentations to always be on the right track.
January 24, 2015 Book Reviews No comments
I started to buy equities thanks to the interview for the developer role I had in local financial startup. So in order to better understand their business I opened an account with a broker bank. (Btw, I even had gambling accounts when I worked for a betting company.) My current equities portfolio is up 7% since September 2014 when I started to invest into equities. Of course I’m in a good position since it is still bull market we are in. Nevertheless there is a lot of danger in this overheated environment and way too many pitfalls. So knowledge, discipline and patience are key.
As for the knowledge there are plenty of books written on investing. A lot of them are just mutually contradicting and more often than not useless. But there are books that were tested by time and deserve their mention in “best” lists. No wonder top of most of those lists is “The intelligent Investor”. I’m reading it at the moment and I can tell that it is by far the most far reaching book of all other ones I’ve read on investing. But to be honest, I’ve only read very few and I didn’t pay to much attention to selection of books, so I was reading some nonsense about doomsday and gold rush. Therefore I decided to come up with some good list for this year, since I anyway planned to read at least 13 books on investing.
I compiled this list in very simple way by searching the web for lists of recommended books and then selecting only those that appear most frequently in those lists. I scanned maybe 20 lists. The list below is like unsorted merge of other lists. I’m planning to have reviews for each of these books and then in the end of the year to have a list with overview and maybe my rating. So if I come up with rating list, it will also include other books I’ve already read on investing that didn’t make it into this list.
Some other books I consider to read or I might read instead of one or few above
If you are total beginner I think it is wise to start with smaller books like “The Little Book of Common Sense Investing” or “The Richest man in Babylon”.
I think it is very important to have the knowledge in a field you want to operate in, being it software development or investing or whatever. So good luck both to you and myself.
January 23, 2015 .NET, JavaScript 1 comment
In a project I’m working on we have plenty of shared logic that we want to execute both on client and server. We decided that we want it to be written in JavaScript. As our backend is .NET we used Jurassic library to compile JavaScript code on the server and then to execute it whenever we needed it. We used Jurassic library for quite some time and it worked fine. It is a bit slow on doing initial compile of all of our JS code, so our startup time lagged (+30 sec or so). Execution time also wished to be better. But recently we started to get crashes that seemed to be from the library itself, but it is a real pain to find out what was the problem since library doesn’t provide JS stack trace.
If everything goes smoothly all you need to do is to reference EdgeJs.dll through NuGet and execute your node script using Edge.Func. But life is not that easy.
I would recommend to create minimalistic project with basic things that are used in the project you are going to integrate Edge into. This will allow you to save time on testing how integration works. You can start with hello world available on Edge.js page. I’ve also created simple project with few things I wanted to test out, mainly loading of modules, passing-in and getting results.
Here below are three files from my sample project. It should be easy to follow the code plus there are some comments just below the code.
In Program.cs you can see how easy it is to invoke Edge and pass in a dynamic object. Getting result back is also super easy. If you are working with large objects you might want to convert the object to JSON and then pass it into your JavaScript. This is what we do using Newtonsoft.Json.
Edge.Func has to accept a function of a specific signature with a callback being called. Alternatively you can have a module that itself is a function and then load it. Exactly what I did with module edgeEntryPoint.js. To do something useful, I’m trying to dynamically find an object ‘className’ and call a function ‘functionName’ on it plus I send some other parameters. This is somewhat similar to what we want to achieve in our project.
calc2D.js is a module with logic that I’m trying to call. There is one interesting thing about it. It is the way how it exposes itself to the world. It checks if there is ‘window’ and assigns itself to it or otherwise assigns itself to ‘GLOBAL’ so this module with work fine both in browser and in Node.js.
It is very likely that you are signing your assemblies therefore you will get compile error telling you:
Assembly generation failed — Referenced assembly ‘Edge’ does not have a strong name.
Don’t panic. You can still sign Edge.dll. There are few ways of doing it. You can even rebuild Edge source code with your key.snk or what I find more easier is to disassemble, rebuild and sign from VS console using 2 commands:
ildasm /all /out=Edge.il Edge.dll
ilasm /dll /key=key.snk Edge.il
In case if you want to run same JavaScript both on client and on server you might run into issues of namespacing and global variables. Above I’ve already demonstrated how we exposed our own namespace by checking if ‘window’ is defined. If you are trying to load a lot of modules you might want to assign them to global variables before your callback function returns. For example:
moment = require(‘../../moment.js’);
If you still get error ‘window is not defined’ it could be that some internal logic is relying on global ‘window’ being defined somewhere. In order to fix it you can just have this kind of a hack in front of your entry function:
GLOBAL.window = GLOBAL;
There is already issue reported on this on GitHub edge#215, which I believe is similar to what we are experiencing (if not exactly same).
In our case we want to run JavaScript from .NET that runs in IIS. I created wrapper around Edge that keeps compiled function, and then Invoking is done whenever we need it. One interesting thing started to happen when I had web site pointing to bin folder. After rebuilding the app initialization would hang on Edge.Func. If I kill the w3wp.exe process and start the app from scratch all works just fine. Unfortunately I was not able to reproduce this with console application. I suspect that this has something to do with how IIS threads run and possibly locks files, but still if I locked node.dll, double_edge.js and edge.node files for console app it was not reproducible.
Issue was solved by ensuring that IIS is stopped before building the web project. This can be achieved by using commands ‘iisreset /stop’ and ‘iisreset /start’ in BeforeBuild and AfterBuild tags of your csproj file.
I don’t think that this is the best way to solve this or that running Edge.js in IIS is very reliable, so I spent a bit of time reading source code of Edge.js and debugging it. And to be honest I don’t quite understand all the things around invoking native code to make all this magic happen. Because of this I’m not 100% sure that entire solution with Edge.js will prove itself to be a decent one.
All in all Edge.js is a really great tool. Not so long ago things it does would be unbelievably difficult to achieve.
I hope this post is of some help to you.
January 14, 2015 YearPlanReport No comments
2014 didn’t turn to be forth life changing year in a row. I still have the same job and live in the same place. As I probably mentioned before, I’m working as subcontractor to International Atomic Energy Agency (UN associated organization). This year I’ve mostly done JavaScript and less of .NET. But I don’t mind. That is because JavaScript has its own beauty.
My daughter is now bit older and of course occupies a lot of my time. She needs more and more attention as she moves closer to being two years old. In her year and a half she already travelled more countries than her grandparents in their lives. 2014 was definitely a year of travel. We visited islands of Malta and Mallorca and I’m really glad that my daughter is fine with planes, because this means that we can have more distant trips in future. Of course we travelled by car all around Austria (Prague and other places in Chez Republic, Munich, Slovenia and Croatia, Poland, lots of Hungary, etc) and in Austria, mainly visiting public swimming pools, museums and having some outdoor activities.
It is fair to say that we tried to have each and every weekend somewhere outside. This of course had impact on what I could do to improve my professional skills outside of the work, which I didn’t do much except of reading few books.
There is one different thing that I started doing in 2014. I’m investing my money now. And not just bank deposits or mutual funds as I used to do, but the real thing – exploring equities and other instruments and buying then (for long). I’m planning to do more of this in 2015.
This is continuation of my year plan/report thread. I had similar plan for 2010, 2011, 2012, and for 2013. Completion of 2010 list was almost 100% successful, completion of 2011 list was less successful. 2012 list completion is somewhere in between. Both 2011 and 2012 greatly changed my life. Same was with the year 2013 and it was mostly successful. You can see above how my 2014 year went.
Last year I didn’t come up with new year’s resolution. Things didn’t go sideways because of that, but I had nothing to compare my achievements with. I think I will better have some simple list on what I’m planning and want to do.
It is a bit late, but I wish you all
April 8, 2014 EmberJS No comments
I had to implement copy functionality in our Ember application so it would allow to copy any section of data from parent source to target. In order for this to work deep copy of corresponding section has to be created and each id changed in it so that Ember handles it as another entity.
In Ember you can add Copyable mixin to your object and then implement method copy(). That’s fine, but what if you want to make it generic for anything? Other approach we all know is deep copy by serialization/deserialization.
If you are using Ember Data it is likely that you have your own serializer and adapter. So in order to implement deep copy you will need a bit of “magic”. Here it is:
copySection: function(source, target, sectionName){ var sourceSection = source.get(sectionName); var copiedSection = sourceSection.serialize(); var type = source.constructor.metaForProperty(sectionName).type; var serializer = this.store.serializerFor(type.typeKey); // traverse your copiedSection and generate new ID for each child var normalized = serializer.extractSingle(this.store, type, copiedSection, copiedSection.id, 'findById'); var deserialized = this.store.push(type, normalized); target.set(sectionName, deserialized); },
Hope it comes handy for someone.
April 7, 2014 HowTo, Opinion No comments
Usually when I have some adventures with backing-up and restoring I don’t write a blog post about that. But this time it was bit special. I unintentionally repartitioned external drive where I kept all of my system backups and large media files. This made me rethink my backup/restore strategy.
I will begin with the story of my adventures. Currently I’m running Windows 8.1. The other evening I decided I want to play old game from my school days. Since I couldn’t find it I decided to play newer version still relatively old – released in 2006. As usual with old games and current OSs it wouldn’t start. As it is normal for programmer I didn’t give up. First of all there was something with DirectX. It was complaining that I need newer version, which I of course had, but it was way too new for the game to understand. After fixing it game still wouldn’t start because of other problems. I have changed few files in system32. It still didn’t help. Then I decided on other approach – installing WinXP on virtual machine and run it there. I did it with VirtualBox and it didn’t work because of some other issues. Then I found Win7 virtual machine I used before for VMware, but that VM didn’t want to start.
At this point I decided to give up with that game. So to compensate I started looking for small game I played in university. Unfortunately the other game also didn’t want to start by freezing my PC. After reboot… ah… actually there was no reboot since my Windows made its mind not to boot any longer!
Now I had to restore. Thankfully my Dell laptop had recovery boot partition and I was able to quickly restore to previous point in time. Not sure why Windows didn’t boot if recovery wasn’t pain at all.
After that happened I decided that I need additional restoring power. So I ran program by Dell called “Backup and Recovery” to create yet another backup of the system. Program asked me for drive and I found one free on my external HDD where I keep system images. Unfortunately I didn’t pay attention to care about what that special backup might do. It created bootable partition and of course repartitioned entire drive. I pulled USB cable when I realized what it started to do!
I had to recover again, but now files on repartitioned drive. If you look online there are some good programs that allow you to restore your deleted files and even find lost partitions. One of such is EaseUS, but it costs money and I didn’t want to pay for one time. Thus I found one free called “Find And Mount” that allows to find lost partition and mount it as another drive so I can copy files over. That’s good but for some reason speed of recovery was only 512Kbit/s so you can imagine how much time it would take to recover 2TB of stuff. I proceeded with restoring only the most important stuff. Maybe in total restoring took like 30+ hours.
Bit more on this story. Since I needed to restore so much stuff I didn’t have space for it. My laptop is only 256Gb SSD and my wife’s laptop (formerly mine) also has only that much. But I had 512 HDD left aside. So I just bought HDD external drive case for some 13 EUR and thus got some additional space.
So that was end of story. Now I want to document what I do and want to start doing in addition to be on the safe side.
What’s are the top most important files not to lose? – These are photos and other things that are strongly personal. I’m pretty sure if you have some work projects they are already under source control or handled by other parties and responsible people. So work stuff is therefor less critical.
My idea is that your most important things should be just spread as much as possible. This is true for photos I have. They are just on every hard drive I ever had. At least 5 in Ukraine and 4 here in Austria. Older photos are also on multiple DVDs and CDs. Some photos are in Picasa – I’m still running old offer from Google 20Gb just for 4$ per year. All phone photos are automatically uploaded to OneDrive with 8Gb there. Also I used to have 100Gb on DropBox but then I found it too expensive so stopped keeping photos there.
All my personal projects and things I created on my own are treated almost the same as photos, only they are not so public, often encrypted.
So roughly backup strategy:
I started to think if I want to buy NAS and some more Cloud. For now will see if I can get myself into a trouble again and what it would cost if it happens.
On the image below Disk 0 is my laptop’s disk. Disk 1 is where I now have complete images of 2 laptops at home, complete copy of Disk 2 and also Media junk. Disk 2 is another drive with Windows installed, which will now be used regularly for backups and for “File History”.
Now some links and how-to info:
This was just a story to share with you but it emphasises one more time that backups are important.
P.S. I finally managed to play newer version of 2nd game :)
March 24, 2014 Conferences, Opinion No comments
What a silly title for the post. What if everyone wrote about what they are NOT doing?
Well, I write this blog post partially to convince myself that decision on not attending NDC2014 is right and partially to share my thoughts on such aspects of attending conferences as price and return of investment.
I always wanted to visit some big developer’s conference. One of the conferences that I definitely like is NDC (either in Oslo or London). I think it has best mix of technologies that match my interests and at the same time has big names in it.
I wanted to go there for 4 times. First time I just asked my company in Ukraine, but it would be too expensive for them and I don’t know if they ever sent people to such conferences. Second time I asked company here in Austria, but I was new employee to send me somewhere – I didn’t have a chance to prove that I worth it. Third time I just couldn’t do that because my daughter was about to be born. And this summer I’m not going to allow myself to attend it on my own.
Reason is simple – price. I’ve calculated that it would cost me around 2600 Euro (~3600$) to attend it. This includes tickets for the conference and flights, hotel, food and 3 working days. Organizers wouldn’t give me a discount.
Being self-employed makes you really consider such things as conferences from manager’s or company’s perspective. You start to think about return of investment and how to justify conference attendance. Real question is if money spent on conference will benefit you correspondingly.
NDC videos are available online shortly after conference. It is not a secret that what people get from conferences is not content of presentations but possibility to establish relations with gurus who are at the top in the industry. I heard this so many times. One of my old friends said that conference really starts when presentations are over and people get together at lunch or dinner or at party.
Taking this into account it is very hard for me to believe that I could establish good connections at any conference. I’m usually shy, especially when it comes to social events and new connections. I don’t think that I’m only one who has this problem. Probably most of developers to some extend have similar issues. I found some articles on how you can attend conferences as yourself. But point that I’m trying to make is that usually it is company that pays for their employees therefor developers are not that much concerned about the price and of course they are happy to attend. I would also be happy if someone paid for me. Some say that conferences are often just a reward for best developers for being loyal to their companies.
I concluded for myself that from learning perspective I would not gain much from this conference and from networking perspective it doesn’t worth so much money. Of course there is tiny chance that I’m overlooking some big opportunity.
I believe that if I spend just half of those money on small conferences and tools/learning I will get more in return.
This beginner’s guide to attending conferences is quite useful. I think I will use some of the provided hints when I’ll be attending smaller conferences.
One last thing, probably ultimate goal for any attendee of any conference is to grow to the level when you are invited as one of key speakers.
January 22, 2014 Agile, Opinion 3 comments
Here is how top of my working tasks list looked like in the end of a day:
I’ve got nice count of 10 commit items awaiting to be pushed to the server.
Have you noticed number 10? Why 10? And what should it mean?
10 a day is my limit at the moment!
What if something new pops up?
There is one special rule: You can always interrupt to add task to your list. Apparently when you work on task some items pop-up, if you address everything at that moment you won’t be able to complete your main pomodoro. Instead what you can always do is to switch screen type task and again switch to your work.
What if new big stuff comes up on your way?
How many personal pomodoros there should be?
How to stick to this technique?
January 2, 2014 EmberJS No comments