Friday, December 19, 2014

Time Tracking from Commit Messages

Everybody hates time tracking. Mostly because it takes some time (even if it's just several minutes) to enter the TT system, enter the duration, choose the project and maybe write a comment. Programmers have it a little easier. They are used to writing comments after their work into a VCS (Mercurial, Git, etc.).

Why not combine the two. What if you could write a time you spent on the feature directly into the commit message? Some VCS support this already.

Trac (http://trac.edgewall.org/wiki/TimeTracking)

It's a plugin which is not easy to configure but you can enter the time spent in brackets like this "(1h)".

Freckle Time Tracking (http://mir.aculo.us/2009/10/12/instant-time-tracking-from-git-commit-messages/)

"So Freckle Time Tracking now comes with Github integration, which means you can instantly log time from Git commit messages when you push updates to Github."

Entering times looks like this "f:2.5". More details: https://help.letsfreckle.com/import-export-api/log-time-from-commit-messages

Redmine (http://www.redmine.org/issues/1518)

Supports it since 5 years ago. Format "time 30 m" on a new line.

JIRA (https://confluence.atlassian.com/display/AOD/Processing+JIRA+issues+with+commit+messages)

That's the largest issue tracker, of course it supports it. Format: "#time 1w 2d 4h 30m".

Rechnung+

I'm the developer of a small time-tracking system and I don't use any of the above. So I've made a small PHP script which would analyze the commit log and collect the times from it. Format: "[0.5h]" or "[22:15-23:00]". The results would look like this, but it's easy to customize.


Using all the power of millions of idle computers

Do you know how busy is your computer on average? You think 50%? Open a task manager and check yourself. Mine was busy at 2-3% only. That is having a browser, text editor and a couple other app open. Unless you are archiving or extracting an archive, your computer is almost doing nothing. It's the power wasted. Think of thoussands and millions of computers turned on but doing almost nothing. That's maybe not the case for computer professionals, but even they don't use more than 20% of what they have. Whatever you do: browsing, watchin video, listening to music, typing... Especially typing - it can do millions of operations between each two letters that you type. Why doesn't it?
In 2000, when I was graduating, one of the graduation topics was about "agents" - small applications running on multiple computers on the network performing some distributed task. It was a hot topic back then and it looked like in no time, all computers will run some kind of agent.
Now, in 2014, I can't recollect I've heard the word "agent" in years. What happened? And what can we do to revive the idea?

What are agents?

If you have head of SETI@Home or Folding@Home you should know what I mean with an "agent". It's: - a small application - running on multiple computers - receiving tasks to do from the Internet - processing something - sending results back to the Internet server.
This effectively allows to use the power of thousands (millions) computers to do a very complicated task which is split into smalled chunks in parallel. This is a huge potential. Imagine how much would it cost to purchase a thousand average computers, place them somewhere, connect them all, pay for the power they consume and maintenance. This is what companies like Google do. They have the money, many other organizations don't.

My suggestion

Programming a new system like SETI@Home is not a simple task. Redoing it again for another project is a waste of time and not DRY(http://wikipedia.org/wiki/DRY). But most complicated is to enlist users to download and install one more client on their computers. Why not having a general agent system which is capable of running any task? Users only need to install it once, but the participating organizations would only need to program the actual computational algorithms (about 20%) - not the 80% of the infrastructural code. This will allow smaller ogranizations to gain access to free computer power - benefiting the society. Users only need to install an agent once and rest assured they are helping the world by just not turning their computer off.
It should be written in Java. I don't like Java so much, but there's no other language which can be run on almost any computer that exists. It also features a relatively good security by isolating the running code from the operating system.
The client would be represented by a task bar icon. When you open the details it should show a project it is working on (SETI, Folding or anything else), current CPU idle percentage, CPU idle percentage if no task was running, total processing time spent since the installation and some kind of reward points collected for donating your computer. It should detect when computer needs some extra power for doing user-initiated task and pause the task processing so that users don't feel that their computer is any slower than before.
A server should be able to maintain a list of projects and hold the source and processed data for the project. The results may be obtained by the project's owner organization. A website of the project can show the total processing power in use (FLOPS).
BTW, do you know that the total processing power of Bitcoin mining machines have exceeded 16 petaFLOPS? The world's top ten (all ten of them) supercomputers can only do 5% of that. And Bitcoin mining is NOT what your average neigbour is doing. The amount of processing power being wasted is just mind blowing. The cure for cancer maybe found just 10, 100, 1000 times faster. Imagine a thousand other projects which are NOT done because of lack of computer power.
Would you allow your computer to do some research while you are browsing?

Monday, July 07, 2014

Pringles Trash Bin for the Car

I often feel sorry when I see car drivers throwing trash and cigarette buds out of the window. As if the whole world is a trash bin. I bet they don't do this at home. For those who retain some kind of conscience I have a tip.

  1. Buy one Pringles chips can and make it empty. You dont need to eat the chips - they aren't healthy food. 
  2. Then stick the empty can into the bottle holder in your car. You may need to squash the base of the can if it doesn't fit. 
Now you have the whole liter of the free space for the litter in the car. It has a tiny footprint, its held tight, it doesn't have a bottle neck, its easy to empty when it gets full. And it protects the environment.
Another observation/hint: I need to exchange the can for a new one about once in several months as it gets dirty and sticky with a bubble gum :-)

Monday, February 17, 2014

Youtube Trends 4@4AM source data

When trying to see episodes of http://youtube-trends.blogspot.de/ 4@4AM which I missed last week, I've come across the source of the information for the video player.

http://spreadsheets.google.com/feeds/list/0ArrSjcjGNEM2dDdpSUlSXzJ5VWMwWFFwZkdqSDBoU1E/od6/public/basic

Which also has a HTML representation:

https://spreadsheets.google.com/pub?key=0ArrSjcjGNEM2dDdpSUlSXzJ5VWMwWFFwZkdqSDBoU1E


I've not succeeded with retrieving the last week data though I've learned that the only thing they need to do to update list of videos is to edit the online spreadsheet and add four new lines to it. That's clever.

Wednesday, October 23, 2013

Ausfahrt A5 zum L3004 bei Frankfurt

Email to strassenverkehrsamt@stadt-frankfurt.de.

Sehr geehrte Damen und Herren,

warum gibt es kein Ausfahrt/Einfahrt bei der Kreuzung A5 und L3004? Ist es geplant? Meine Meinung nach, es ist offensichtlich nötig.


Danke,
MfG

Antwort:
Sehr geehrter Herr ...,

Sie hatten sich mit einer Anfrage an das Straßenverkehrsamt gewandt, deren Beantwortung innerhalb der Stadt Frankfurt a.M. in unseren Zuständigkeitsbereich fällt.

Beim Blick auf den Stadtplan mag der Gedanke, die A5 mit der L 3004 zu verknüpfen, sinnvoll erscheinen. Aus der Untersuchung ähnlicher Fragestellungen ist aber bekannt, dass ein solcher Anschluss so attraktiv wäre, dass die L 3004 sowohl in Richtung Oberursel als auch im Stadtgebiet Frankfurt völlig überlastet würde. Von daher verbietet sich ein unmittelbarer Anschluss des nachgeordneten Netzes an die Fernautobahn A5 im Norden Frankfurts. Die Verteilung des Quell- und Zielverkehrs muss vielmehr indirekt über die Regionalautobahnen A661, A 66 und A 648 und die dortigen Anschlussstellen erfolgen, um überhaupt bewältigt werden zu können.

Die Stadt Frankfurt a.M. wird daher keinen entsprechenden Vorstoß unternehmen. Es bestünde im Übrigen auch keine Aussicht, dass die Autobahnverwaltung einer solchen Verknüpfung zustimmen würde. Darüber hinaus bleibt festzuhalten, dass die Höhenverhältnisse im Urselbachtal zu einem sehr hohen technischen Aufwand für eine Anschlussstelle führen würde.

Freundliche Grüße
Im Auftrag

Dipl.-Ing.
Jens Wöbbeking
Stadt Frankfurt am Main
– Der Magistrat –
Referat Mobilitäts- und Verkehrsplanung
66A.1 Fachbereichsleiter Gesamtverkehrsplanung

Thoughts about visas in 21st century

We live in a world where nanotechnology and space travel have become common place. Where flights have allowed us to cover huge distances in mere hours. Just think about how long your last flight would have lasted if you were to go on the horse!

Yet we live in a medieval age in regards to countries and borders. Back then each city was building walls around itself in order to protect itself from conquesters. And each country has build national borders in order to protect it's land and citizens. This all made sense at that time. There were enemy armies and it was common to top-up one's treasury by conquering a neighbour country.

A child doesn't choose in which country to be born. A person who happen to be born on one country may want to travel to another. Unrestricted. He could have been born in a different country. Somehow the act of being born at some place or the other enables him to have more or less opportunities in live.

Nations which require a visa seem to be proud of themselves so much that they prevent other people from visiting their country. I can understand being proud. But shouldn't you invite others to share your country's beauty?

A visa requirement is imposing large barriers on applicants and it's kind of preselecting people. One needs to be relatively rich in order to just pay for visa application. One needs to provide a lot of personal information in the application and provide evidence for it. And then the authorities may still choose to reject entrance to their country.

Being born at some place doesn't mean that person himself is good or bad. Shouldn't the passports based on the ethical behavior of the person make more sense than based on the political map?

Imagine an international worldwide passport which identifies a person and a worldwide database of criminal, ethical, environmental and moral offenses. Everyone is trusted to have a good will and allowed to travel the world. But somebody who killed a dog or even another person should remain in the region where he is and not pose a threat to other regions.

Probably it only makes sense to me...

YouTube channel idea: Professions

With the advent of multitude of new educational YouTube channels explaining science in an entertaining way like: numberphile, SciShow, CGPGrey, Veritasium, Numberphile, sixtysymbols and Vsause people are much more likely to get education, get it right so it sticks and keep learning after graduation.

There's one thing missing in our life in general and as a YouTube channel. Teenagers get a very little information about different professions.

In the past carpenters, farmers and kings have raised their offspring teaching their profession to the kids from an early age. Nowadays companies never allow children at their parents' work places. It's even absurd to imagine that. Hence children may not learn from their parents like it was in the past.

And though the teaching role of the parents is lost it's not replaced with anything else. Neither school nor universities give any in-depth information about thousands of different professions. So children are left to make uninformed decisions. All children, all the time. No wonder so many people are unsatisfied with their life! The feeling of being needed, joy of working and appreciation of the work you've done are one of the most motivating and rewarding feelings.

I imagine a YouTube channel where an interviewer and a camera-man are going each week (part-time) or even every day (fulltime) to one new working place suggested and selected by the subscribers. They interview and show(!) the exact daily routine of that person and try to cover all aspects of it in less than 10 minutes of a video footage. The video should be informative, engaging, fun and entertaining in order to gain a large audience.

Awkward and rare professions should be mixed with most common and wanted professions. With time many companies will compete in order to get their employees interviewed as it raises the exposure of the company.

What it's like to be a farmer, farmaceut, pilot or speleologist? I wish I knew that when I was young.

Idea: Android platform for the conference schedule apps

Checking printed schedule is not 21st century. Mobile app with a schedule should allow offline schedule checking, private custom schedule selection, checking the location map. It should be time aware and hide the information which has been in the past during the conference.

The actual data should come from the web-site, cached permanently for the offline mode. A standardized REST API should allow any conference to prepare a schedule information for the app.

The current conference should be selected based on the GPS information.

Make it a little bit intelligent, people.

A central server should contain a list of possible conferences with links to joind.in and slideshare.com. Organizers unable to provide a REST API should be able to manually create the schedule online in the backend.

Idea: In flight location information

Aircraft can be equipped with a simple WiFi access point (Internet connection is not required) where interested passengers will connect to get a map and a location of the aircraft in real-time. As simulating the GPS inside the aircraft is impossible, the current location should be transferred from the access point by a custom protocol.

So the usage of Google Maps or any other standard app is not possible, but the custom in-flight app should be able to display cached maps from the device.

Additional information such as the current speed, altitude, heading, remaining flight time and others should be available as well.

As more than 50% of the people flying the planes have a mobile device and this number will only increase to 100%, it's possible to spare the display installation inside each seat and provide a more convenient and customized experience for the users. The installation is even more cheap because there are no wires to install and maintain.

Additionally music and videos can be streamed from the access point to each user thus replacing the complete package of the in-flight entertainment.

Possible problems:
- Accessing in-flight computer information needs to be investigated.
- WiFi on board of the plane is sometimes not allowed, what's the rule?

Idea: Electronic Billboard

Let's install many electronic displays instead of the paper billboards at the airports, hotels and other places where it's not easily vandalized. The displays should display ads randomly just like Google Adsense does.

Each device will have a WiFi and 3G connection, will connect to the central server once in a while to update 10-20 advertisement PNG files. This gives small companies an opportunity to become visible even when it's for the short time.

For example: 1 minute display on one device could cost 1 EUR. With a current situation companies need to invest thousands of EUR into long term billboard ads because it's visibility time is measured in days and weeks.

PushBullet

Hey, good news. This is the perfect software I found for sending files from a PC to an Android device quickly. Highly recommended.

https://www.pushbullet.com/about

How to restore the precedent session from a sessionstore.bak file

This is a cross-post from https://support.mozilla.org/en-US/questions/947856

When I tried to open firefox it automatically updated and supressed the sessionstore.js file. I saved the sessionstore.bak into another folder, closed mozilla, changed the extension bak to js in the "profiles" folder of firefox and opened it again but nothing happened. Though the sessionstore.bak file is 13Ko big and seems to contain all the links of my previous session.

How could I force Firefox to start a session using the information in the sessionstore.bak or .js file as it should?


My Answer

  1. Open a sessionstore.js file in a browser. It can be a different browser (Chrome) if you like.
  2. Open Firebug/Inspector.
  3. Type:
    eval("ss = "+document.body.innerHTML.replace("<pre>", "").replace("</pre>", ""));
  4. Type:
    for (var i = 0; i < ss.windows[0].tabs.length; i++) { var ent = ss.windows[0].tabs[i].entries; var last = ent[ent.length-1]; document.write("<a href="+last.url+">"+last.url+"</a><br />"); }
Enjoy all tabs from sessionstore on your screen. You only need to Ctrl-click them one by one.

Addendum: In case you see an error "TypeError: ss.windows[0] is undefined" you need to try again but replace all references of "ss.windows" to "ss.closedWindows". This depends on the contents of your sessionstore.bak file.

Friday, August 02, 2013

Copy whole folders from Android with only MTP to the PC (over USB, using PHP and adb)

I've always wanted my mobile phone photos to appear on my PC "magically" when I come home and have a WiFi connection. I just haven't found a decent app for this yet.

In the mean time I used to copy files with USB cable. Back in the days the phone SD card was automatically mounted as a new disk so I could automate the process with "robocopy". But ever since phones switched to MTP protocol I had no way to use batch files to copy new pictures. I guess you know the painful process of using Windows Exprorer. Mouse-oriented, choose the source folder (MTP is slow), select all files, copy, go to the destination, paste. Manual work. Programmers don't like repetitive manual work.

But then I discovered that "adb" allows to "pull" and "push" files to the device over MTP. Unfortunately it doesn't support copying whole folders. It's been several years until I discovered an "adb" command to list files on the Android device. Whow! No I can script it to copy whole folders and automatically skip files which have been already copied.

Here's the result. The script is written in PHP. You run it like this:
> php acf.php /sdcard/DCIM/100ANDRO/ ./100ANDRO/

It will read all the files in the "100ANDRO" folder on the connected device and copy missing files to the specified folder on the PC.

Requirements:
1. PHP installed.
2. Android SDK installed.
3. "USB debugging" enabled on the phone.
4. Download the script below and try.

All links contain the same source code:
http://demo.php-pastebin.com/VsY8J7m6
http://codepad.org/bYC3JLZ8
http://ideone.com/3lljIB

Friday, May 31, 2013

Concise and Reliable Backups with WinRar


I use the following BAT file to do daily backups:
start /b C:\Program Files\WinRAR\winrar a -u -as -r -ms N:\ProjectsBackup.rar c:\users\depidsvy\NetBeansProjects\
  • start /b - open WinRar and close the black CMD window immediately (as opposed to keep it open while archiving)
  • a - add new files
  • -u - keep unchanged files - don't repack again
  • -as - delete deleted files from the archive
  • -r - with subfolders
  • -ms - don't pack, include as they are the following files: 7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lzh, mp3, rar, taz, tgz, z, zip
Enjoy

Monday, May 27, 2013

Force charging Prius battery

Everybody knows how to force discharging Prius battery - that's what the EV button is for. Today, being afraid of the red triangle error, I wanted to charge the battery before going to the automatic washing booth. Pressing gas pedal while in [P] doesn't charge. But pressing both brake and gas pedals in the same time in [D] did the trick.

Thursday, April 18, 2013

Завтра едем в Голландию

Завтра едем в Голландию. Жить будем в Sint Maartenszee. Рядом будет магазин SPAR, дюны, море и ядерный реактор. Главная цель поездки - парад цветов. Витя советовал посмотреть голландскую венецию - Giethoorn . Прокат лодок - якобы 15 евро.
В Голландии много (десятки?) городов и замков в виде снежинки окружённой водой. Один такой будет недалеко - Fort Erfprins, но это военно-морская база. Маленький Den Helder. Другие: Naarden, Brielle, Bourtange. Вот фотки пятерых (что за слово такое) из них. Ещё Loevestein.

Смотрите также несколько прошлогодних ссылок (ещё). Там тоже интересные места.

Далее список всего подряд:

Tuesday, March 05, 2013

Single most annoying Prius problem

I'm a happy Prius driver. But one thing that bugs me a lot in Prius 2006 is that Consumption MFD screen doesn't show the current consumption value, only the approximate bar. I have to switch between the information screens to read that value and then switch back to see the chart quite often.

As a side note I'd also like driving instructions (turns) to appear in the corner when Consumption screen is active. This way I would not need to switch to the map screen either.

P.S. I accidentally googled an interesting screen. I wish I had this one as well.

Source: http://priuschat.com/threads/next-generation-mfd-check-it-out.84493/page-2

Friday, March 01, 2013

Why time tracking is best with Rechnung+

There are dozens of time tracking apps and sites, no surprise it's very hard to choose one which fits you best. Here I share my reasoning so it may be easier for you to choose.

1. It needs to be free.

While it may be OK to pay for some larger software which is outmost important for your work (I think of the PHPStorm, other examples are Photoshop, 3DMax, MS Office, etc.) I'm not ready to pay for dozens of smaller tools which make my life easier but are too cumbersome to take extra efforts to choose the payment plan, choose payment method, pay and wait for payment to arrive or investigate why payment didn't pass through.

2. Registration should be easy.

Login and password is the minimum necessary data for the registration. Everything else is redundant. Extra information may be filled in later when I'm sure I'll continue with the selected tool. Registration with OpenID from Google or other providers will make it even faster and easier. A demo account without registration at all is even better.

3. It should be quick to track.

Noone wants to track the time, it's a distraction from the actual work. If I do it, I don't want to spend more than 1 minute. After login I should be able to fill-in the rest of the pre-filled form with default data. So then I can return to work or get rest
without wasting my time.

4. Getting data under control.

Well, it's my own time tracked even though it's stored on some server somewhere else. I need to be able to download the whole package of data for private backups, importing into some other system or even post processing in Excel.

Rechnung+ can do it all.
1. It's free.
2. Registration is easy, just three obligatory fields. Demo account can be tested without any registration and OpenID is supported.
3. Time tracking is fast. The only necessary field is the "duration". Rechnung+ allows real-time tracking with start/stop buttons.
4. You can download your data for a local backup, export project data into CSV, run built-in time and money analytics and even delete your account completely.

Please comment if your time tracking tool can do all of that and maybe some more.

Saturday, October 20, 2012

Time-tracking based on git or mercurial commits

Time-tracking for the projects has always been a straining task for me. One has to remember the time when the work is started and after the work is finished one needs to open a time-tracking system, find the correct project and fill-in the form with the starting time, ending time and a comment. Often it's the same comment which was already inserted into a version control system during a commit. What's easier: reach out to copy/paste the old commit message or rewrite the same message in other words?
I've found a solution. https://github.com/spidgorny/git-hg-rp.
This system does both, it automatically fetches the starting time of the work, the ending time is the time of the commit, comment is the commit message. And it also posts it directly to the time-tracking system Rechnung+.
Pretty nice, isn't it?

Tuesday, October 16, 2012

Don't cut in front of the highway traffic when leaving the acceleration lane, you idiot!


The rule on the acceleration lane is not to interfere with the traffic already on the motorway. Make sure your speed is the same as the traffic already on the motorway. Mirrors and signals must be used correctly to avoid interfering with the following traffic.

This is very obvious and simple rule, but it needs to be reminded over and over. Please repost, retweet and share.