Friday, January 22, 2016

Aha!

 Continued from the previous Aha!


The game of life
Share with this link





Choices! Choices!
Share with this link




Continued in the next Aha!

Tuesday, January 12, 2016

Files and folders to add to gitignore for a Netbeans project

You're obviously on this page because you're a Netbeans fan. Congrats for choosing it over Eclipse!

When it came to creating a .gitignore file for my Netbeans project, it was hard to find resources on the internet to figure it out. Needing to push and pull to a Git repository meant that I shouldn't mess up my colleague's or my project settings, but still be able to share code.

So after some trial and error, these are the files I figured that need to be added to .gitignore.


/.project
*.o
*.o.d
/build/
/dist/
/lib/
/nbproject/private/
/nbproject/Makefile-Debug.mk
/nbproject/Makefile-impl.mk
/nbproject/Makefile-Release.mk
/nbproject/Makefile-variables.
mk

/nbproject/Package-Debug.bash
/nbproject/Package-Release.
bash
.dep.inc

DefaultComponent.mak
DefaultConfig.cg_info
MainDefaultComponent.cpp
MainDefaultComponent.h 


Some interesting trivia about the Netbeans-Eclipse war from James Gosling himself: http://nrecursions.blogspot.in/2014/07/preview-your-webpage-realtime-while.html#useanyideyoulike

Sunday, January 3, 2016

A bashrc for Windows!!!

Today I came across a script I had written long ago and had completely forgotten about. Once you start using Linux, you'd want pretty much the same functionality in Windows. So I had created a bashrc equivalent for Windows.

Create a file named WindowsBashrc.cmd and follow the instructions in the comments below (REM is the short form for "Remark", and it's the equivalent of a commented out line. REM is used in BASIC and Windows batch files for commenting out lines).

@echo off

REM This has to be enabled in [HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]
REM "AutoRun"=C:\pathToYourFile\WindowsBashrc.cmd
REM It basically makes this script run whenever a command window is started


@echo "Hi Navin. Missed you! :)"
@doskey ls=dir
@doskey f="cd.."
@doskey ff="cd..;cd.."
@doskey fff="cd..;cd..;cd.."
@doskey ffff="cd..;cd..;cd..;cd.."
@d:




btw, in Linux, thse are some handy bashrc aliases you can use: http://nrecursions.blogspot.in/2010/09/setting-up-your-bash-prompt-for-colours.html

Saturday, January 2, 2016

The My Funny Profile website information is fake

If you Google your name, you'd probably find it listed on a website named My Funny Profile, with a lot of silly information about yourself which you did not put up.


This is an excellent way for any website to build an extremely bad reputation for itself by showing everyone how unethical and disrespectful they are.

There was a similar website like this long back, named Yatedo. It would copy people's LinkedIn website details and post it on their website. They would ask users to register on their website in order to modify or delete the information, and once the user registers, they are never given the option of modifying or deleting the information. Similar to how ransomware operates.

Don't fall prey to such websites.

Ugly Indian: The UFO project

During the past many months, Bangaloreans began seeing the pillars of flyovers all across Bangalore getting a snazzy makeover. While I have participated in and blogged about other Ugly Indian projects...


...this UFO (Under The Flyover) project made me wonder how they painted it so neatly.

  • Who draws those white lines so accurately? 
  • How do they prevent the paint from trickling down?
  • Is it really a few hours of work?

Screenshot from Facebook

Turns out that before the orange paint was applied, the flyover pillars were covered with posters from people who obviously didn't know how to advertise.

Screenshot from Facebook

So this is not just a few hours of Saturday work. Before Saturday, before the invitation is sent out to Bangaloreans to come and paint the flyover, there are a bunch of Ugly Indian volunteers who spend many hours in removing the posters from the pillars, cleaning the pillars and then spending a lot of time in carefully painting the entire pillar!!!

That's not just a lot of work, that's a LOT of time and money too!

I wanted to know how this is done, so early Saturday morning, I visited Nagavara flyover. I didn't have time to participate, but this is what I found:


The pillars were already painted orange and white.

But a closer examination revealed...


The white lines were not paint. It's white tape.

And sure enough, a little away there were people applying more tape.


On the other side of the road, some pillars were labelled with chalk.


And if you are an early bird, you get to choose which colours everyone has to paint on the triangles.



By 11:30am, most of the pillars had been painted by volunteers wearing yellow aprons...






...and as I suspected, they had painted onto the tape as well, so the nice white outlines you saw earlier, were no longer visible. There was some paint that had dripped down too. The tape is removed eventually, leaving orange lines separating all the triangles. The bottom of the pillars, where some paint dripped down, would also be re-painted with the orange paint and I'm quite sure some volunteers would return to put finishing touches to the triangles where the paint of one triangle slightly overlapped the paint of another triangle.




These are some of the other UFO paintings. This photo was sent to many of us by email, from the Ugly Indian group.




Splendid effort!

The takeaway from this is not just about using your free time to volunteer to make this world a more beautiful place, but the takeaway is also that when you volunteer, make sure you put in enough of effort to do it correctly.

There are far too many volunteering groups in India, which do not care about going into detail. This holds especially true for corporate employee volunteering, where the objective is just to hold a tiny event for a few hours, not so that society is benefited, but so that the company is benefited because they got a chance to amuse their employees and de-stress them for some time.

When you volunteer, do it because you want to improve things. Not because you want to make a name for yourself or impress someone.


More on volunteering