Saturday, October 19

Do it now!

Weekends are always to chill out. Chilling out for me is to sit in front of the computer and keep clicking links and read whatever i can. And that is when i came across this article from my favorite software developer "Coding Horror".


And that indeed took me to this article from SEO black hat.

It actually makes sense. It does. Yup. It is indeed inspiring.

Do it F***ing Now.
Don't wait. Don't procrastinate. The winners in this world are not the ones who find the greatest excuses to put off doing what they know will make them more money. The winners are the ones that prioritize and seize the day.
Create a list of action items to make sure your important tasks get accomplished. Every project you're working on should be in action. If you're not moving, you're standing still. Your next step towards making money must not be "something I'll take care of maybe sometime next week." If it's going to help make you money: Do it F***ing Now.
Some of you may think that you don't need the "f***ing" in "do it f***ing now". You do. You need that impact, that force, that call to action, that kick in the ass to get you moving. Otherwise, you'll end up another loser that had a great idea a long time ago but never did anything about it. Dreamers don't make money. Doers make money. And doers "Do it F***ing Now."

I have had this idea, which i really want to put it across over the internet. It is simple and very much doable. I have had plans and think about it. But i just procrastinate and waste my time over the internet.

I find reasons to not do it. I find fascinating open source code over the weekend, and then i want to learn that so that i can use it to code my idea. But by the time i start, i have this another article on hacker news and then my interest shifts. I have realized that a long time ago. But i keep making this mistakes. 

I think i need to just focus. Do It Now! F***ing Now..!!!! 

Saturday, October 12

Twitter Bootstrap 3 navbar dropdown does not appear in IE9

While working with Twitter bootstrap, i came across this weird issue on IE9 only.

When clicking on a dropdown menu, the list items would not appear, they were getting hidden behind the content. However only the box shadow of the dropdown area would appear, indicating that there was more links.

I tried with updating the z-index but it appeared that, z-index was not the issue. However after debugging and disabling one CSS property at a time, i realized that the Microsoft filter property for gradient was the issue.

Removing that from .navbar class worked.

.navbar {
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);
}

 

Sunday, October 6

XCOPY command on windows 7

Apparently, my windows 7 machine crashes explorer when i try to copy files from my hard disk to my cellphone or a pen drive. The best solution i found was to use the command XCOPY.

The command works as below.
XCOPY source destination

For instance if i want to copy music from F: drive to L: drive
XCOPY "F:/music" "L:/music"

[Update]
The above command just copies files from source to destination. Today I encountered a situation where i had to copy folders and files within the folders. The best command for that is
XCOPY "F:/music" "L:/music" /s

where /s is for "Copy folders and subfolders"



Sunday, September 29

CSS - Center div when its position fixed.

I had to center a div of list items in the center of the page. However the catch was that the div was set to position : fixed. It is kind of tricky but you can do this with CSS.

1) Provide a width to the main parent div. Preferably in percentage so that works fine on responsive layouts.
2) Provide a negative half of the width value of div to the margin-left property.
3) Let the left property also have a value of half of the div.

I've created a simple POC here, with help of various resources found on the internet.
http://cdpn.io/hDndA

Sunday, September 22

Writing!!!

I have read numerous articles about importance of writing. In fact, I've read articles from web professionals who emphasize how writing their thoughts has helped them achieve their goals. Below are few reasons of top of my head.

  • It improves your language.
  • If you can put your thoughts on paper, then it will also help improve your communications.
  • If you can write your ideas, you can share your ideas and communicate it effectively.
  • you can connect with people.

The other day, I had to meet a person to discuss about a web project. I did a little research about the industry. Wrote down few points that would help me sell my services. I had a good feeling.

The idea was to build a brand and get it out to the people. And i had put in efforts to convince him that how a blog would be very useful. Write articles, share pictures related to your industry, upload videos etc. Sounds very simple. No hoopla there.

But i failed to realize that the person I was trying to share this info had just heard the term "Blog". He did not know anything about it and that was ok. They don't have to know all this. It is my job. 

But i failed drastically.

I was trying to convince him to write a blog, say a post every week, so that it builds the brand and increases the visibility.

He was able to digest this information, but I had a hard time. 

Just then i realized, how stupid it is for me to convince someone to write when i myself am a not regular writer. I had this reminder set up on my Google calender that gives me a notification every friday, that I have to write a post. But i just let that notification sit there entire day and do nothing about it. 

And that is why this post. I really need to focus and be very particular about my tasks. I need to be systematic. With use of smartphones, tablets, computers and web apps, there are numerous services that easily help one stay up to date with minimal efforts, but this procrastination, the mother of all the evil just keeps returning to my life.

Arghhh...!!!!

Saturday, July 6

Angular Js : What if you want to update the count of search results for filter search?

What a better way to spend a weekend then learn a new framework. Started my day with angular js and their documentation and examples are pretty good for beginners like me. I decided to get my hands dirty and play around with their example code step by step.

While working i wanted to update the count of the number of phones depending on the result while searching. If the search result displayed 10 phones, then the count of phone should automatically be udpated to 10 and so on.

Stackoverflow has already covered this:

The most easy to understand solution i found was to update the length via the filter like below

Found phones : {{(phones | filter : query).length}}

Wednesday, July 3

Google reader shut down, and will you work on a idea for your company?

Google reader shut down is massive news. I came across this article, and it makes sense.


Should you work on your passionate idea, for a company which may take it down any time? Or should you take it up as a side project? The latter sounds the correct way now.
Google reader being widely used, it was really not necessary to shut it down. In fact why is orkut still alive?


Friday, June 21

Scared to Start!!!

You have a super cool idea and you think you can do a better job at it. you are already dreaming its future. Infact you are virtually feeling it. So what is it that is stopping you?

You are scared to start. Because you don't know how to start. Should you design first, make a prototype or dive right in with your coding skills. If you start coding, you realise you do not have enough experience and that you have to get your concepts clear about the technology you plan to use. And then you realise the technology you are learning is already outdated and people are talking about cool stuff on hacker news. You are lost.

Too much mess in head? The problem is you don't know what is happening around or you are too scared to face the reality. Fuck yeah!!


Friday, March 1

Quitting and then starting again.

I have decided, its time to say "I Quit", And start all over again with a new goal.
I had started learning python and finished most of the tutorials and then started learning Django. I spent a lot of time on it. I realized it is not that easy for me. I was just going through the tutorials and reading code. I did not succeed not even close to getting a simple app up and running. So I have decided it is time to Quit.

What went wrong?
1) Reading code does not help. It is waste of time. Practicing helps. I was able to learn jQuery by practicing code. I should have known that. But i choose to ignore.

2) Working on a real world problem. Best way to learn is to work on an application from beggining. I have had experiance working with PHP, Mysql. So getting started should not be difficult. My approach should have been:

a. Work on an Application idea.
b. Create a flow.
c. Start with coding from day one.
d. If encounter a problem, google search and try to solve it.
e. Move ahead with coding and finishing the application.
f. In the process learn.

Instead i took a wrong approach, tried learning an entire language, and delayed the process of working on the application.

I now have an application idea. I know php and mysql and jquery and good amount of html/css. But i wish to learn a new programming language. I think i can start working with Ruby on Rails. I have tried the tryruby.com lessons and found it very interesting. I think i will follow that.

Will this approach work?
I don't know. It may or it may not. I have self learned php, mysql, html, css and jquery. I may not know everyting but i am pretty confident i can get a solution by googling. I want to learn a new language. Have failed (read quit) at python. I find RoR interesting, so today I make a promise to my self to learn this language.

I hope i don't quit again. If i do, i have this post to remind me my failures.

I'll keep posting the progress.
Adios and wish me luck..!!!

Friday, February 1

Installing and configuring ImageMagick with WAMP on windows 7.

Installing and configuring ImageMagick with WAMP on windows 7.

Image Magick is a software suit to create, edit, compose or convert bitmap images. It support a wide range of image formats. You can also use image magick to resize, rotate, flop, mirror etc images. You can use the functionality of image magick from command line or you can use it via your favorite programming language.


Php has an ImageMagick class which uses the image magick api. With this class you get various methods with which you can create a web app to execute various functionalities such as image conversion from one format to another etc. you can check the imagick manual here.


Requirements

I previously had an experience in installing the image magick suit and the corresponding php dll api on windows xp.


I had xampp 1.7 verison installed and image magick version 6.6. To get xampp working with image magic api, the php dll extension used was compiled using vc6(Visual studio 6). (Pretty old version, and it required a lot of trial and error in configuring the correct versions)


Now I had to install image magick on the latest windows 7 machine. Following was the configuration of the stystem.


1) OS – windows 7 Enterprise Edition service pack 1
2) System Type – 64-bit Operating System

Step 1


Installing wamp server


This time I wanted to go with wamp server instead of xampp server. There is a 32 bit as well as a 64 bit wamp server available for download. See their website

Initially I installed a 64bit wamp server setup but was not able to get image magick running. Also I read in one of the stackoverflow forum that image magick dll for 64 bit does not work. (No evidence or any solid statment) So I then downgraded to installing a 32 bit wamp server setup. Make sure you install Visual C++ 2010 SP1 Redistributable Package x86 or x64 as mentioned in the wamp website. See below screenshot.




Step 2

Check if wamp is installed correctly.

After installing wamp, for me the wamp server would not start and apache services would not install for me. When you right click wamp system tray icon and go to apache->services and click on Test port 80, it would say that


port 80 is used by Microsoft HTTPAPI/2.0. To install the service, we first need to release port 80.


There are various resources available which provide the solution. Some of the possibilities could be IIS server installed, Skype installed etc. If skype is installed and running. Either stop skype and then start wamp server, and then start skype or change the port in skype settings to not use port 80.


(Below screenshot is taken just to show where you can get the option to Test port)





I tried with disabling IIS, removing port 80 option in skype but it did not work. Then I changed the port to which apache listens to in httpd.conf file to port 7080 instead of port 80. And then my wamp setup work.


http://localhost:7080



Step 3


Installing Image Magick software.


To be able to use the image Magick API in your program, you have to install the image magick software. There are various binaries of image magick available. You can learn about the latest version here. http://www.imagemagick.org/script/binary-releases.php


However we require the binaries for which there is a compiled php dll available. Since wamp server uses the php version 5.3.12 (in my case). I was looking for an image magick binary which has a php dll available.


You can download the latest php builds for image magick here . However we also need the Image Magick binary. You can get the older binaries from here .


It has a lot if binaries available for download. After trial and error multiple windows restart, it turns out the best binary suitable which worked with the dll file was ImageMagick-6.8.0-0-Q16-windows-dll.exe.





Once you have Image Magick installed, check if it is working correctly. Go To command prompt and type


convert -version




Step 4


Configuring php dll file with wamp


Now that Image Magick is installed and you have the php dll file downloaded from the website, you can now save this dll file in your php ext folder. For me it was in

C:\wamp\bin\php\php5.3.13\ext




Update your php.ini file


extension=php_imagick.dll


Restart your system. Then start your wamp server. Once everything looks fine, check your phpinfo() for imagick installation.



Everything looks pretty good :) Go over to your project and start coding

Hope this helps someone. If you have any experience in Image Magick, or know about such tool, or you have any comments, share here

How I started reading?


#TrueStory

Was browsing through reddit and found this interesting question. The OP (original poster?) had asked about everyone’s “how-they-started-reading” story. Sharing my story here.

I was never a reader. During my school days, I had read about Famous Five novels, but that was it. It was because I had nothing interesting to do during summer holidays. That was I think 8th grade.

Fast forward, I completed my engineering and took up a job in a startup. It was recession and everyone was getting laid off, so I took the first job I got. Not part of story, but I like to mention about 2008 here and there.

Work involved a lot of research, very little fun, so one day my boss said, we are going for a movie. All three of us (yeah the company was that small). The movie was Sherman joshi’s “Hello” based on Chetan bhagat’s “One night at call center”.

The theater was half empty, not even 20% people seen. We were enjoying the movie. At intermission, they displayed a paper note on the screen with one of our seat number. The note said that our seat was the hot seat and we had won a gift (Yay!).

After the movie, we happily rushed to the Ticket counter to collect our gift. From the exit of the screen to the Ticket counter, we had several guesses as to what could be our prize. Could it be free movie tickets for next movie, or lunch passes, hope it is lifetime membership to the theater. (Ok, the last one was a bit exaggerating). So we show our ticket, and what we get? We get chetan bhagat’s novel “One night at call center”, the movie we just saw. Disappointment. I don’t recall what made me ask my boss the book to read (he purchased ticket, so he was the rightful owner), took it home and was curious to know if there was any difference in the book and the movie. I read it page to page, it was simple and very interesting. That is when I decided, reading would be my favorite hobby.

Saturday, January 5

How I consume digital data - More via smartphones and less via Desktop.


For a long time, reading blogs is been my favorite past time. And the best tool so far ever is the Google Reader. I have had way many RSS feeds subscribed on my Google Reader. It is so many such that, the count of unread posts never fall down below 1k. Until recently I realised, that reading all this posts was just a formality and a way for me to decrease the unread count. 

I had created folders in Google reader and systematically categorised all the feeds. Blogs such as of Coding Horror, Joel on software were in "mustread" folder. Blogs such as nettuts were in a "Tutorials" folder and so on. 

Before, everyday my day would start with google reader on my desktop followed by emails and ToDo's. But things now have changed. With more of the reading done on my awesome smartphone, desktop is used only for working.
Then i learned about hacker news, quora and Reddit. So started spending more time on these and Google reader was no more a primary resource of reading for me.

Enter Smartphone
With big screens, good data plans and to top it all very elegant and smartly designed apps, reading has been very delightful on smartphones and tablets. 

So, i then started reading during my free time while watching TV or just before heading to bed. Thus saving a lot of time for getting actual work done.

I have been using Google Reader for android, BaconRead for reddit subscriptions, Quora's app for android, Hacker news app and also saving articles on Pockate for android.


Time to Unsubscribe from Google Reader.
I had a lot of Tutorials based subscriptions and reading code on a smartphone was not helping. I realised that I had subscribed to a wide range of topics and that was a little destracting. Plus reading a lot of code and just viewing a demo did not help at all and added up in the wasted time bucket. So the first thing for me was to get rid of all the tutorial based feeds.

So now anything and everything interesting I wish to read is in the front page of either hacker news or reddit. Also I have kept to a minimum sub reddit subscriptions so as to avoid any unnecessary noise. If it is not on the front page, it is not interesting and worth spending time on.

Enter Quora.
Quora has been a favorite past time. It is a very good forum website and has a very high quality of questions and answers. No spam and also no unwanted ads. users actually spend a lot of time writing answers and they are very interesting and can be a good form of knowledge repository.


I recently also got BBC News app for my android.
A very goood news app indeed and it is very well designed. The best part being it has no ads. So you actually like using such apps. They have ofcourse high quality articles not like Times of India or any other Indian newspaper per se. Plus the TOI app has adds. Its annoying.



To Conclude, this 2013, consume less on desktop, more on smartphone and get more work done.