A Quote
22 Jun 2012"To be a good programmer, you have to be a good tester"
that's the hidden (or not so much) assumption what lies in the TDD (or Test Driven Development) methodology
that's the hidden (or not so much) assumption what lies in the TDD (or Test Driven Development) methodology
Google was and is pushing for better web both on desktop and now on mobile too.
Here's a nice website that will help your company to transfer to mobile space: http://www.howtogomo.com/
They even have a gomometer which will analyze your site and give an advice on how to improve it so it is more "mobile friendly"
To import an SVN repository into git, you can use the git svn command.
If you want to just import your SVN repository into Git as is, you can run the following sequence of commands:
$ git svn clone SVN_REPO_URL LOCAL_DIR
$ cd LOCAL_DIR
$ git remote add origin git@example.com:USER_NAME/REPO_NAME.git
$ git push origin master
If you repository is setup in a standard way and you want the git svn command to be smart about it, you should add the -s flag to the first command:
$ git svn clone -s SVN_REPO_URL LOCAL_DIR
$ cd LOCAL_DIR
$ git remote add origin git@example.com:USER_NAME/REPO_NAME.git
$ git push origin master
Which basically says to git svn that your repository is in a standard layout.
This tutorial will use MacPorts, so please first of all make sure you have XCode installed as it will be needed for MacPorts (and many other things too if you are a developer and you probably are if you are reading this)
You can see how to install MacPorts here
Let's install MongoDB. It's one easy command with MacPorts
$ sudo port install mongodb
***If you had MacPorts installed before, consider updating it
$ sudo vim /etc/mongodb.conf
*** you can use nano instead of vim if you prefer
sudo nano /etc/mongodb.conf
Paste the following into the
mongodb.conf
and save the file.
```bash # This is an example config file for MongoDB. # Place it at /etc/mongodb.conf # Based on a sample provided at # http://www.mongodb.org/display/DOCS/File+Based+Configuration dbpath = /var/lib/mongodb bind_ip = 127.0.0.1 noauth = true ```After you are finished installing MongoDB via MacPorts, you should see the following notice:
```bash ########################################################### # A startup item has been generated that will aid in # starting mongodb with launchd. It is disabled # by default. Execute the following command to start it, # and to cause it to launch at startup: # # sudo port load mongodb ########################################################### ```so running
```bash $ sudo port load mongodb ```should get you setup with automatic start of mongo.
To start it manually you should create the following file:
/Library/LaunchDaemons/org.mongo.mongod.plist
and populate it with the following:
```xml <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">to launch MongoDB on demand you will need run:
```bash $ sudo launchctl load /Library/LaunchDaemons/org.mongo.mongod.plist ```once you've done the above and MongoDB is either autostarted or you created the start script and started it manually, you should be able to run
mongo
to get to the MongoDB shell:
You will see the following prompt:
1. Installation base ($prefix) : /Users/Admin/pear 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /Users/Admin/pear/bin 5. PHP code directory ($php_dir) : /Users/Admin/pear/share/pear 6. Documentation directory : /Users/Admin/pear/docs 7. Data directory : /Users/Admin/pear/data 8. User-modifiable configuration files directory : /Users/Admin/pear/cfg 9. Public Web Files directory : /Users/Admin/pear/www 10. Tests directory : /Users/Admin/pear/tests 11. Name of configuration file : /Users/Admin/.pearrc 1-11, 'all' or Enter to continue:
Type 1 and then type /usr/local/pear
You will get the previous prompt but with different path values
1. Installation base ($prefix) : /usr/local/pear 2. Temporary directory for processing : /tmp/pear/install 3. Temporary directory for downloads : /tmp/pear/install 4. Binaries directory : /usr/local/pear/bin 5. PHP code directory ($php_dir) : /usr/local/pear/share/pear 6. Documentation directory : /usr/local/pear/docs 7. Data directory : /usr/local/pear/data 8. User-modifiable configuration files directory : /usr/local/pear/cfg 9. Public Web Files directory : /usr/local/pear/www 10. Tests directory : /usr/local/pear/tests 11. Name of configuration file : /Users/Admin/.pearrc 1-11, 'all' or Enter to continue:
Type 1 and then type /etc/pearrc
Now type
Now you need to run:
```bash $ sudo /usr/local/pear/bin/pecl install mongo ```Configure the system PHP to load MongoDB extension.
Add this line to your php.ini:
extension=mongo.so
Restart Apache:
```bash $ sudo apachectl graceful ```You should be all set to go... Enjoy!
TextWrangler already installs the command line utility "edit" so the hardest pard is done, if you did not install it for some reason, then just go to "TextWrangler --> Install Command Line Tools..." and you should be all set with this part.
To make Git play nice (or should I rather say TextWrangler play nice with Git), we need to properly set it up as the default editor for Git. And luckily it's as easy as
git config --global core.editor "edit --wait --resume "$@""
So you bought the Kindle Fire and you want to start running and debugging your apps on it but when you connected it, you realized that it is not recognized automatically like other Android devices on OS X.
No worries, it takes 2 minutes to set it up.
You need to:
Open up the terminal and edit the "adb_usb.ini" (you can use nano instead of vim): vim ~/.android/adb_usb.ini
add the following 2 lines to the file each on a separate line:
now you need to restart the ADB server and you should be all set.
The whole sequence of commands looks like this:
Now you should also see the device while running your app from Eclipse
For the official directions in case you need them and for directions for other OS besides OS X, you can check out this PDF
Important tip:
The networking will not work until you "disconnect" the device from USB - just click on "Disconnect" don't worry it will only cancel the "file transfer mode". You will still be able to deploy and now actually run apps that require networking.
In the terminal run:
defaults write org.eclipse.eclipse AppleAntiAliasingThreshold 20
edit $ECLIPSE_HOME » Eclipse.app » Contents » MacOS » eclipse.ini and remove the following line:
-Dorg.eclipse.swt.internal.carbon.smallFonts
Very nice graphics for the Android DevCamp
Going to be at the Cambridge office this w-end hacking away. If you are in the Greater Boston area and want to attent you can register here: http://devcampbostongtug.eventbrite.com/
For all the locations around the world you can go here.