Thursday, January 22, 2015

Useless hobbies and interests

Long time no see my dear reader! This post is special - it's dedicated to my rather new (6 months old) interest - cars. As cars prices, availability and specifications are rather local this post main part (about cars) will be presented in Polish (I also don't know the English vocabulary to write about cars... nor do I know general one to be fair).

Get down to business - useless interests - that's my problem. The Internet is full of (I mean totally, absurdly packed with) content and I'm susceptible to it. I love reading about stuff, be it new processors, new smartphones or other piece of junk gadget... Nowadays I read about cars, watch youtube viedos about cars, HOLY MOLY my time!!! New information about esport, YES PLEASE! Don't tell anybody but I've even read some lifestyle blogs...

Another example - few days ago I was talking with a friend about digital cameras and somehow mirrorless interchangeable-lens cameras were mentioned, I didn't know what it is so went to computer to check that. Then I learnt about types of cameras, how they are build, what is RAW file, how to convert it, different lens mount systems, how autofocus works and so on... When I looked away from monitor it was 3am :(

The worst part about it is that all the topics that absorbs me are useless for my job, they stop me from doing other, more productive things. They just keep me in front of the monitor and makes time flies. Is there a solution? If so... HALP ME!


But the sad truth is... it is probably incurable...

Now the promised part about the car (in Polish) - CLICK ME NOW (will be active tomorrow - 23.01.2015 FAIL... active on 09.02.2015)!

Sunday, January 4, 2015

Failure is Part of the Success Equation

It's final time to come clean...


As you remember I was really pumped out when I finished my first challenge two weeks before the planned end. On December the 15th I challenged myself to get new record in number of kilometres per month with 150 km. I was progressing very well towards it...

I tried...

and FAILED. Yep you heard it right. I did not succeed. I've achieved highest number of kilometres per month (135; 1 more then previous record) but didn't run 150.

I was on the right track, I worked hard - I run before the Christmas Eve (23) and each day after (25, 26). Unfortunately on 25th my right knee started to hurt a little bit. I shrug it off as knees hurted me in the past and it was nothing serious. Next day when I run it was my most difficult run ever. My legs were super heavy and the knee was trying to explode. I bited the bullet and continued. The end result was rather good (approx. 4:35 min/km) but I was unable to move normally next day. The knee gone from light pain into strong one. That's why I had to abandon current challenge. I can't risk more serious problems. Winning the battle and losing the war is not an option for me!


Failure


There is one more important thing - failure is part of the game and it's the part that makes everything interesting. If there is no risk of failing what kind of challenge that is? Win-lose is a neccessity to makes things worth trying. This is what motivates - the risk of losing. Wise man thinks similar:


And now for something completely different


Blog gets new page - Challenge list where both finished and in progress challenges are described with starting date, end date, the result and all other important details. Go check it out! Now. And add to your bookmarks ;) Ohh and check this - so crazy epic!

TL;DR


I failed with my second challenge (if you care about excuses read the whole thing:) . Sometimes that's what happen despite trying hard. I'm not giving up, next time I will succeed!

Also new page on the blog - list of challenges.

Wednesday, December 31, 2014

Project Shining Runners Cap

Greetings my dear reader (readers? - I dunno how many of you reads my scribbles)!

When I started running I made one more resolution - to stop procrastination. To never ever postpone doing something I wanted to. Usually I had a lot on my mind (mostly stuff related to work) and all this pulls me from bringing my new cool ideas to life. The end result is that I waste my time - I don't have power to do the things I had to so I just... wander around the Internet for too much time. This era has definitely ended and now I will carry out all my ideas :) I say NO to procrastination!



Project origins


During October I was usually running few hours after work which means at around 8 or 9 pm (20/21 in polish time). The place I run has some parts with lights, but some parts are covered in darkness. To avoid collisions with bikers and other people (and to be less scared of darkness) I used simple app on my phone that uses flash light to blink at some intervals. The app is called Tiny Flashlight and can be found in Google Play. The strobe mode can be found here (there is some problem with that link... I don't know why, it works for me (I have this app installed) but not for other users...).

During my night runs I was thinking how to better light myself (not literally!) - eg. use colourful lights to show the pace or the music that I'm listening. That's how it all started...

The result


After few single person brain storms done while running I decided to upgrade my current cap with lightings. I grab some led lights from older projects, convinced my wife to prepare some material and this is what I get:



As you can see from the video it is in very early pre-alpha state. I used some W2801 led stripe sewed into scrap of material. It is connected to Arduino (control, on the right) and some DC/DC inverter (power, on the left). It supposed to be letter A... at the back of the cap there are four more lights.

All in all I'm not satisfied with current version. The led stripe is difficult to strap to material, its connectors are prone to be damage by bending (like iphone... maybe it should be named iCap;) and at the moment it looks just bad. That's why I'm abandoning this version and  leaving it in this unfinished state. It's not worth putting the work when you can have much better lights (they are already coming thanks to aliexpress.com!).

Somewhere in the future I will describe in details all the plans and parts for my super-duper cap!

Ohh and: Happy new year!

Monday, December 15, 2014

Ka-Pow*! First challenge shattered into pieces!

* for the felons not familiar with internet gibberish - kapow in urban dictionary :)


BAM! The countdown has finished! I made it, the first challenge has been beaten to the ground! 500km before the new year is achieved today, the 15th of December! It was publicly announced (on the blog) on the 1st of December (I came with that idea a week or so ealier). I worked hard, run highest number of kilometres per week (8-14.12: 44.42km) and finished well before the New Year's Eve. Nothing more to say than easy peasy lemon squeezy:


Now to the point - challenge yourself, find WHAT you want to achieve, plan HOW you will do it, and then stick strictly to the plan and just DO IT. There is one important requirement - LIKE doing the thing (you have chosen to do).

As for myself I'm in a need for new short-term challenge so here you go:
Run more kilometres than ever in one month (current record: 134km in October).

One more thing to note - to celebrate my small success I tried to break the 5km record but failed by 4 seconds cause I forgot what it was during the run. It reminded me about one thing - do not be afraid of failures. Failure is part of the game, you have to accept it. I know that next time I will beat the crap out of this record. It's just a matter of time. Also... I broke 3miles and 3km record :)

Time to finish this with some motivational sentence for future:

Next challenge (half marathon) better watch out, cause I'm coming for Ya! And when it happens... BAM! In a blink of an eye... You dead.

TL;DR

I've finished first of running challenges - run at least 500km before the end of the year. As there is a lot of time to go I decided to try to break my record of number of kilometres run in one month (134km).

Sunday, December 14, 2014

Hackathon numer 1!!11!!!!1!!

The idea of late night coding

Some time ago a friend of mine linked me this article:
http://en.codeceo.com/why-programmers-work-at-night.html

It strikes me that I totally agree with all the arguments about why coding at night is productive. Unfortunately my work obligations require me to get up early on every Monday, Tuesday and sometimes on Thursday. Despite this, last week I tried late-night coding at it was fun, it reminds me of the times when we were constructing and programming sumo robots whole night, just before the competition!

Goal definition

Encouraged by the success of this programming effort I decided to do it again on the weekend. As weekend should be free from work stuff I went for my own secret project that I was planning during my running workouts. I found some inaccuracies in the way the Endomonod (application + website I use for recording my runs) calculates records and lap time. More details about this in some future post. In short the planned app has to be able to:

  • read the *.tcx file (holds all the information about activity like all the trackpoints)  exported from Endomondo website,
  • calculate the distance travelled based on longitude, latitude and altitude data,
  • show the data on charts.

As you may know, writing an app is not as much fun as writing it in a new language! Killing two birds with one stone - writing the app and learning the basics of Python was my goal!

Hell, it's about time to start The Hackathon!

It all started at 6:00 pm and finished at 2:16 am (not that late!) with some breaks in-between (eating, discussing differences between programming languages with friend and so on).

The whole process was documented and can be found on github (tried to commit changes regularly):
https://github.com/Michal-Fularz/python_tcxVisualizer

This was my first foray into the Python world, and oh boy, what a ride it was! I don't know where to start so maybe I will just write how the hackathon went and then present my thoughts on Python.

I used Python Tools For Visual Studio with Visual Studio 2013 Community Edition and Python 3.4. All the necessary packages were downloaded from this dedicated website. (lxml, scipy).

As reinventing the wheel was not my goal so I started with a search for libraries / code that can help me with my task. I found this and was able to almost immediately start working with the data from *.tcx files. Then I ask google about the way to calculate the distance between two points described by latitude and longitude and found a link to a Python implementation through a wiki page. Almost all the code was found somewhere in the internet (as I didn't know how to iterate through the collection, how to write if statement or even for loop). Fortunately there are so many good tutorials and info pages that I was able to accomplish my goals - prepared application reads the data from *.tcx file, put it into designed object, calculates all the interesting values (lap times, average speed, total distance, etc.) and shows them on the charts. I manually added some values from Endomondo website to compare with the ones I calculated. Image below shows my app printing some calculated values.

Results printed by my program. Also the speed chart (I run over 80 km/h at some point!).

Summary

To sum up this lengthy post (keep in mind that these are beginner thoughts on Python):

I have a lot of fun programming this simple app in Python. What really surprised me is how much examples you can find (almost all my problems were resolved with just one query to google). The syntax is really neat. The way you handle most things is different than C/C++ or C# (languages I'm familiar the most). I have to thank a lot Przemek Walkowiak (przemkovv) for his tips about Python. He showed me some secret magic like list cohesion, bisect and zip functions. Instead of using this tools I was for looping (C-style) most of the time :)

8-hour hackathon was nice experience and I'm satisfied with what I achieved.

What the future holds

The program still requires some work - it can't handle lack of altitude filed in *.tcx files. It will fail if there were stops during the workout. The charts require some polishing. There should be some automatic way to download the data from endomondo website (I found this). All in all two or more hackathons are required two finish this little project. See you soon!

TL; DR

I taken part in my own 8-hour hackathon and learned Python programming language while writing the program to analyse and visualise the data from my workouts (Endomonod website). Result can be found on my github.

Monday, December 1, 2014

I've got a confession to make...

I hide it... I truly conceal it... This whole idea of blogging was somewhere in my mind. But the thing that motivated me to start it, to do it came from running.

Running is simple, it's just you against yourself, your weakness. Everything depends on you, each run is a challenge, which you can overcome. When I am running with my favourite music I feel I can do whatever I want, it just a matter of going all-out. It's not easy, it takes time, but if you're persistent and strongly believe that you could succeed you will.

Each and every day you can sit on your ass and watch some funny tv shows or youtube movies, play games or just waste your time. But the same time can be used for something else, juts decide what you really want and do it! Or start with believing that you can do it and it will happen sooner or later!

This is the origin of the blog name. Running makes me believe, that if you want you can. Just do it, don't stop, don't complain, it will take time and sweat but everything is possible if you want. Sound crazy and pathetic but who cares.

I returned to running last year after a break of high school, whole studies and two more additional years. At first I run with my wife in some really old shoes, it was just casual jogging but after few tries I realized that I like it. I bought professional shoes to keep my knees in good shape for later parts of my life :) I finished the year with something like 20, maybe 25 runs. The winter and spring was a long break, but I came back with full power. I don't remember when exactly I run first, but I starter recording my activities on 25.07.2014 with Endomondo app.

You can find info about my progress here (I'm putting some description for each run):
https://www.endomondo.com/profile/17457362

All this running is done, cause some time ago I decided I need a long term goal to test if I'm able to fulfil it. Unfortunately I'm more of a "flash in the pan" type of guy - start with a lot of energy and motivation, that runs out quickly. So I challenged myself - next year (2015) - half marathon and then full marathon. That's the first and most important of my challenges.

A week ago I was analysing my progress thus far and find out that I've run almost 400 km this year (only recorded ones count) so I decided to break 500 km mark this year!



TL; DR

Plan something, challenge yourself, believe that you can do it and it will happen!

My running challenges:
- run in half-marathon in first half of the 2015,
- run in full marathon in second half of 2015,
- finish 2014 with 500km under the belt (check my Endomondo profile to see how I'm doing).

Sunday, November 30, 2014

My stuff part 1 - computers

My inner laziness makes it difficult to fulfil the first announced challenge - to update blog regulary.

This post will be dedicated to computers that I own and used.

Arachic ages

Long, long time ago... when I was a little boy my parents bought us a computer. My uncle, who, at that time was doing some programming, helped us choose one. I barely remember any specification details, but it was 486DX (I still remember that I knew that name when when somebody asked me about our computer :) ). Dunno bout ram, disk space, etc. but what I know is that it run M$ DOS operating system and Norton Commander software (blue screen with two parts - one on the left and on the right). It even had some games, the only one that I can recall is Warcraft II. Also there was some kind of text processor, but I've never used it (only my dad, that is how I saw it).

This image represents my memories about computers at that time.

Based on Wikipedia, the 486DX processor was introduced in 1989, but Warcraft II was released in 1995, which means we were really delayed in Poland :)

The next computer was something like Pentium II or was it MMX (this name rings a bell!). More than the details about it I remember games that I played, but it is a topic for another post. To quickly sum up this period - Windows 3.11, Windows 98, Red Alert, Tyrian, KKND, Age of Empires, Dark Colony, Dark Reign. Then probably Baldurs Gate, uhh... Fast forward to the year 2005, when I was going to study in Poznan. That is when things starts to be interesting.

My first computer

First few weeks of studies I didn't have a computer (probably unimaginable nowadays, but I'm not complaining, it was great time) and do all my programming assignments at home on weekends. I was also choosing the parts for my first own computer. As I didn't know about PurePC site and their recommendations of computer sets and was not familiar with other tech sites (AnandTech or Tom's Hardware) I probably chose components based on hunch (I don't remember!). I spent all of my saved money for following dream machine:

Processor: Athlone 64 3200+ s.939 Venice
Main board: Gigabyte GA-K8NF-9 nForce4-4X s.939
RAM: DDRAM 512MB 3200 PC400 KingMax
Hard drive: WD WD1600JS 160GB sATA II
Graphics: Sapphire X550 128MB 128bit PCI-E
Case: Midi ATX Tracer TRO-252 Duke 4Life 400

It was paired with Creative speakers (SBS240), Hyundai 15' CRT monitor and some noname mouse and keyboard (I run out of money:) Despite some suboptimal elements I was really proud of it and called it DeepBlue. This name come from the computer made by IBM, that was the first to win a chess match with reigning world master (Gary Kasparov). More info - wiki.

It served me really well and as with every desktop computer I was able to upgrade it gradually. First I bought another 512 MB of RAM and then another 1GB. After that I upgraded the graphic card (it was awful) to PowerColor Radeon x1950Pro 512MB because I wanted to play the first Witcher.

"Notebooks are coming" and duality era

At some point of my studies I realised that mobility is important and with my desktop there was no such thing as mobility (I made one trip with it, alongside 15' CRT monitor and it was... I think funny, cause seeing two guys moving computer in a borrowed shopping trolley and panting has to be funny). I decided to buy a small laptop to use it when I'm out (sumo robot competitions, studies, home, etc.) and I choose used Dell X300 from a friend. Some specifications (detailed can be found here):

Processor: Mobile Intel Pentium M Low Voltage 1200 MHz
RAM: 128 MB + 1024 MB = 1152 MB
Hard drive: 40GB
Graphics: integrated Intel 855GM
Weight: 1,32 kg
Others: 12'' 1024x768 screen, docking station with CD/DVD, additional ports and a battery inside



This one was know as DeepBlue-Dell. It was marvellous piece of engineering. That weight at that times. Also 4:3 screen!!! The biggest problem was lack of synchronization software back then (2008) or my ignorance to find one that works well. All in all the notebook was great but using two computers was problematic. Also playing games on the laptop was difficult (only really old titles) and the desktop was also ageing. So I decided to switch and sold both (2010).

One to rule them all

As the title suggest - I was sick of working on two different computers and decided to go for one, powerful (for games), mobile (I moved a lot back then), with high resolution (working with programming tools) notebook. I searched a lot, read a ton and was knowing all the new devices that were coming to the market. I was even familiar with most popular mobile graphic cards scores from 3dmark. After prolonged search I decided - Sony Vaio CW2. Unfortunately it was not available in Poland so I had to ask a friend, who was in UK to buy it. DeepBlue-Vaio specs:

Processor: Intel Core i5-520M 2.4 GHz
RAM: 4096 MB
Hard drive: 320 GB
Graphics: NVIDIA GeForce GT 330M
Weight: 2,27 kg
Others: 14'' 1600x900 screen, WHITE!!!



I used it for a year and a half and switch to other because I get a new one from my employer. FYI the Vaio is still doing well as my wife's notebook.

Monstrosity

Processing power (programming, synthesis and implementation for FPGAs), durability, high resolution, possibilities of upgrade and docking station (for multi monitor setup) were requirements for a new notebook. With my friend (he got the same machine) we chose HP Elitebook 8650w. Specs:

Processor: Intel Core i5-2540M 2.6 GHz
RAM: 8192 MB
Hard drive: 500 GB (7200 rpm)
Graphics: AMD FirePro M5950
Weight: 3,28 kg (!!!)
Others: 15'' 1920x1080 screen, cool metal case with even cooler led-lighted HP logo, docking station



I'm still using it. It's called DeepBlue-HP and was gradually upgraded (up to: 16 GB of ram, 256 GB SSD + 1T 5200 rmp disk). Despite short battery life and high weight it's hell of a machine. The craftsmanship is top-notch, the touchpad is huge and it's a pleasure to use it. I was able to upgrade it a lot (additional disk in place of a dvd) and docking station is pricey but really useful. Great machine when you want one computer for all duties (it's packing a lot of processing and graphic muscles). Also I used it different, sometimes harsh environments and it work like a charm (while programming the rotomoulding machine and in engine test-stand hall).

Back to the roots

As you may guess, after so many years I came full circle. I'm still using a notebook for work, but in home, even now, while writing this post I'm using desktop computer. And what a great machine it is! So much has changed - desktops are much more power efficient, hence almost inaudible. The synchronization programs, cloud became popular and really easy to use. We are living in interesting times, the computation devices are smaller and smaller, can last longer and longer on battery and are so much easier to use and the best thing is that even better things are waiting for us!

Getting back to the subject - DeepBlue-D1 specs:

Processor: Intel Core i5-4570
Main board: Gigabyte GA-B85M-D3H
RAM: 16 GB
Hard drive: 256GB SSD + 1TB HDD
Graphics: Gigabyte HD 7870 OC WF3
Case: Zalman Z9

It's freaking fast!

Comparision:

As this post is much longer than I originally planed, the comparison will be short - evolution of computers shown by increase in processing power (Passmark benchmark):

  • DeepBlue-Desktop (AMD Athlone 64 3200+): 496
  • DeepBlue-Dell (Intel Pentium M 1,2 GHz): 307
  • DeepBlue-Vaio (Intel Core i5-520M): 2394
  • DeepBlue-HP (Intel Core i5-2540M): 3703
  • DeepBlue-D1 (Intel Core i5-4570): 7072
Similar for graphic performance (Passmark benchmark):
  • DeepBlue-Desktop (Radeon X550): 47
  • DeepBlue-Desktop (Radeon x1950Pro): 109
  • DeepBlue-Dell (Intel 855GM): 3 (I took Intel 865 score as there was no 855) 
  • DeepBlue-Vaio (Geforce 330M): 369
  • DeepBlue-HP (AMD FirePro 5950): n/a
  • DeepBlue-D1 (Radeon 7870): 4260
Looking at this scores makes me wonder how the hell we were able to work with such bad computers. The other thing is - how the hell programs still hangs and sometime takes few seconds to respond? Any ideas?