My First Android App “MyGoals”

After having seen a lot of buzz about Android over the last few years, I always wanted to dive into android development. The main motive behind it is that it is open source and a lot of potential the moment it was out. I really like android platform, I have android based mobile as well and we have every kind of app available on its app market. I found some time to dig into android development and made my very first android app named My Goals made with native Java.

In my last article, I had shared GoodTodo app which can be used to set ToDos in your browser; here is My Goals app that you can use to set your todos or goals via mobile as well:

screenshot

Download

PHPStorm Quick Tip: Fix reference class not found errors

Sometimes PHPStorm stops knowing about references or locations of class definitions that were working fine previously. Below is an image (click to enlarge) where PHPStorm tells method not found in class even though class file is included and everything is okay:

phpstorm_class_not_found

This may happen due to a bug in PHPStorm (possibly), unexpected system shutdown, system date time modification or some other reason.

To fix it, you just need to change modified dates of files PHPStorm thinks aren’t there. Once you do that, PHPStorm will reload the changes and will be able to get the reference to those files thereby doing away with such errors.¬†You could simply go to a file and modify it by entering space in its contents or if you have good deals of files, the easiest way would be to touch them. The touch is command line utility that comes with Linux OS. If you are using Windows though, you can download it here. Just run below command to touch all files of the project so PHPStorm knows about class definitions and references of them.

touch -m -c -s -R yourProjectFolder

You can see the options of touch utility by typing touch –help.

 

Automatic git Commit and Push

At times you would like to save some time or find it little boring to repeat same process of committing and pushing to remote git branch; in that case you can find below tip useful. Here is a tip that would help you commit your project changes and push to remote branch with a single click.

Create a file push.sh (notice the .sh extension for bash file) and put following contents in it:

#!/bin/sh
###########################
cd D:/wamp/www/yourProjectFolder
# switch to branch you want to use
git checkout master
# add all added/modified files
git add .
# commit changes
git commit -am "made changes"
# push to git remote repository
git push
###########################
echo Press Enter...
read

Now put that file under your project folder. When you run it, your changes will automatically be committed and pushed to remote branch. Change the commands accordingly to reflect your branch or commit message. Here is the screenshot of what I get after running above commands:

pic

If you would like to customize the commit message, you would modify the script a bit:

#!/bin/sh
###########################
cd D:/wamp/www/yourProjectFolder
# switch to branch you want to use
git checkout master
# add all added/modified files
git add .
# commit changes
read commitMessage
git commit -am "$commitMessage"
# push to git remote repository
git push
###########################
echo Press Enter...
read

And of course, you can add any git commands you would like to automate to that file.

Please notice it is just a tip for those who didn’t know they can automate git commands that way. However, this isn’t usually a good practice; it is always a good idea to review your changes and then commit and push instead of pushing automatically like that. This just turns out to be handy when you are in hurry (or lazy) and are sure about what you are doing.

Please make sure to add PATH environment variable in case script doesn’t work for you.