helion-prime
home about us blogs contacts

Archive for the ‘be smart’ Category

GitHub good working practice

Monday, June 10th, 2013

GitHub is wonderful place to learn new things and help open source community by participating in various projects. GitHub newcomers often have similar problems with git usage pattern, and I want to describe simple strategy to avoid them.

Work with a fork

The first thing is to fork the repository in your GitHub account. Go thru https://help.github.com/articles/fork-a-repo instructions on how to “Configure Remotes” and “Pull in upstream changes” to keep your fork in sync with changes that happen in the official repository.

Never commit on master branch

Each time you want to commit bug fix or a feature you need to create a branch for it. There is no problem for maintainer of a project to accept your pull request from you master branch but it is problematic for your fork when you want to pull the changes back and your master branch has diverged from upstream.

With this strategy you can think of your master branch as a “landing place” for upstream changes. Even your own commits will end up on master after they have been merged in upstream. Also when you do a pull request on a branch, you can continue to work on another branch and make another pull request.

Before create a new branch pull the changes from upstream, your master need to be uptodate.

$ git fetch upstream
# Pulls in changes not present in your local repository, without modifying
$ git merge upstream/master
# Merges any changes fetched into your working files

Create new branch on your local machine:

$ git branch <name_of_your_branch>

Switch to your new branch :

$ git checkout <name_of_your_branch>

Check current branch you are working on:

$ git branch

Push the branch/changes from your commit on github :

$ git push origin <name_of_your_branch>

Delete a branch on your local filesytem :

$ git branch -d <name_of_your_branch>

Delete the branch on github (you can also make it on github site):

$ git push origin :<name_of_your_branch>

Useful hacks

If you accidentally commit on master but have not pushed your changes:

$ git reset --hard upstream/master
# resets your master branch to the same state as upstream/master.

If you need to merge several commits to one commit:
Say your bug fix branch is called bugfix then on the master branch issue the following command:

$ git merge --squash bugfix
$ git commit
# take all the commits from the bugfix branch, squash them into 1 commit and then merge it with your master branch.

If you need to amend last commit:
Make the fixes. (If you just want to change the log, skip this step.)
Commit the changes in “amend” mode:

$ git commit --all --amend
# your editor will come up asking for a log message (by default, the old log message).

How to finish with differences in renders of HTML in browsers

Thursday, August 18th, 2011

preamble

When there is no standard there is no same approach for same things and we have chaos.
But we have standards for HTML and CSS, we can find them all on W3C pages http://www.w3.org/MarkUp/ and http://www.w3.org/Style/CSS/.
And still we hear from users “Why does my website look different on different browsers?” or “I want to kill developers of Internet explorer” from web-developers.

complexity of standards

First problem is the complexity of standards that should take into account many different things. It’s hard for developers to understand and develop products appropriately.
As W3C can’t simplify standards it should put special effort to develop and provide special set of test-cases like famous set of Acid tests but it should provides not just set of randomly picked features but complete cover of specifications – XHTML, CSS, DOM, SVG. There will be standard way to test browsers and someday we will finally have same picture on all browsers.

human nature

The problem not only in the standards but in human nature that incite some people to use evolving versions of HTML/CSS to get fantastic features. But I believe when W3C begins to provide tests it will be evident for anyone that developer is guilty for bugs or using of experimental features.

Improvement of Google Ads

Friday, June 24th, 2011

We all know that Google generates profit primarily from its advertising programs. So keeping them effective is very important but difficult task as users tend to ignore advertisement and use special plug-ins for browsers to block it.

The key here is to make Ads more attractive using information about users, as people say today make them more social. It’s clear that for Social networks like Facebook it is much easier to collect such data then for search engine that can only remember history of your searches and detect your current location.

the straightforward solution

Ask users to provide data and setup Ads they want to see!
google search with customization feature

After users click “Select Ads you want to see” they see simple Ads dashboard:
google dashboard
When users can select useful content there are no reasons for them to block it or ignore, Google can reduce amount places for Ads (like recent bottom place in Gmail) and decries distraction even more. Additionally Google can add Google offers here and turn Ads into some kind of fun.

Don’t use Google recaptcha

Friday, June 10th, 2011

preamble

Google reCAPTCHA is a great idea originally developed at Carnegie Mellon University by Guatemalan computer scientist Luis von Ahn. It uses captcha to help digitize the text of books while protecting websites from bots. According to Google reports it displays over 100 million captchas every day. Among its subscribers are such popular sites as: Facebook, Twitter, CNN.com, and StumbleUpon.

main drawback

So, main drawback is complexity of captchas. Captchas are getting more and more complex or even unreal to deal with. Just check twitter with query like “recaptcha” and you’ll see amazing amount of people that wonder what is going on.

number to think about

A number is 14%. According to my research on 2 our sites: http://prices.by and http://cartenergy.ru we were loosing about 14% of users on services sign-up while using REcaptcha.
The test was conducted using A/B testing where I vary our captcha and Google REcaptcha on sign-up page.

hint to google

Provide some parameter to select level of hardness, use of native languages is also a way to simplify solving while keep great security.

A great technical future ahead

Saturday, May 28th, 2011

When every day seems the same, it is because we have stopped noticing the good things that appear in our lives, Paulo Coelho

Recently I hear almost everyday that technical progress goes very slow, no fresh news. Today I ‘m going to find few cool things that can change our lives in near future to prove once again quote of Paulo Coelho.

Self-driving cars

The project is being guided by the artificial-intelligence researcher Sebastian Thrun, who as a Stanford professor in 2005 led a team of students and engineers that designed robot car, winning the second Grand Challenge of the Defense Advanced Research Projects Agency, a $2 million Pentagon prize for driving autonomously over 132 miles in the desert.

Since then, Dr. Thrun has focused more of his activities at Google, giving up tenure at Stanford and hiring a growing array of experts to help with the development project.

In frequent public statements, he has said robotic vehicles would increase energy efficiency while reducing road injuries and deaths. And he has called for sophisticated systems for car sharing that could cut the number of cars in the United States in half.

“What if I could take out my phone and say, ‘Zipcar’, come here, and a moment later the Zipcar came around the corner?”, he asked an industry conference in 2010.
In 2010 Google said it had test-driven robotic hybrid vehicles more than 140,000 miles on California roads — including Highway 1 between Los Angeles and San Francisco. More than 1,000 miles had been driven entirely autonomously.

And in 2011 Google lobbies US state Nevada to allow self-driving cars. Today cars based on artificial intelligence raise questions about safety and liability but it seems in few years we will be able to ask our cars to drive us home.

Computer diagnoses

In the beginning of year 2011 IBM supercomputer Watson Wins Jeopardy game show’s against former champions Ken Jennings and Brad Rutter.
Watson is a significant leap a machine’s ability to understand context in human language. As IBM has said on several occasions, the goal was not to create a self-aware super computer that can run amok such as HAL 9000 from 2001: A Space Odyssey or Skynet from The Terminator. But a question and answer machine like the ship computer in Star Trek: The Next Generation.


In May 2011 Watson is a second-year med student. For 40 years, clinical decision support systems (CDSS) have promised to revolutionize healthcare. In fact, when the US government recently mandated electronic health record (EHR) systems in all healthcare facilities, one of the key objectives is to promote better and cheaper healthcare using CDSS based on the patient data collected from the EHRs. With the large amount of new data collected by the newly installed EHR systems, computers like the Watson will be able to find optimal answers to clinical questions much more efficiently than the human mind.

IBM’s collaborator on this project is Dr. Eliot Siegal, a senior radiologist and vice chair of informatics at the University of Maryland. Siegel’s team in Maryland helped IBM identify which medical journals and textbooks were best to feed into the computer and which questions to start asking it. Watson read all of Medline, PubMed, dozens of textbooks and asked and answered every question on board exams. “It’s all the information you’d need to be as good as the smartest second year med student,” says Siegel.

The next, more difficult phase of the project is to load Watson up with anonymized patient records so it can marry what it knows about diagnostics with the procedures, treatments and outcomes that follow. Then doctors can query Watson and get an assist in figuring out what to do next. Siegel says “Wouldn’t it be great to distribute sub-specialty expertise to the hinterlands where remote medical practices may lack the experience of seeing thousands of patients?” .

Siegel says widespread use of Watson as a diagnosis tool is more like 8 to 10 years out.

More information about IBM Watson: http://www-03.ibm.com/innovation/us/watson/what-is-watson/index.html

Faster web browsing

As part of the “Let’s make the web faster” initiative Google is experimenting with alternative protocols to help reduce the latency of web pages. One of these experiments is SPDY, an application-layer protocol for transporting content over the web, designed specifically for minimal latency.

In lab tests, Google compared the performance of these applications over HTTP and SPDY, and have observed up to 64% reductions in page load times in SPDY. And the pretty thing is SPDY uses TCP as the underlying transport layer, so requires no changes to existing networking infrastructure. The only changes required to support SPDY are in the client user agent and web server applications.

As client user agent we can use Google chrome browser that already has build-in support of SPDY. Google also use it for its services, such as Google Search, Gmail, Chrome sync and when serving Google’s ads. And people can start using it with web server applications as today we have some first implementation for Apache HTTPD server, Ruby and Java platforms. Google hopes to engage the open source community to contribute ideas, feedback, code, and test results, to make SPDY available everywhere in just few years.

More information about SPPY protocol: http://www.chromium.org/spdy/spdy-whitepaper

©2010 Helion-Prime Solutions Ltd.
Custom Software Development Agile Company.