About six weeks ago, I joined a small group of people who are fellow students at IUPUI and concerned by Indianapolis, Indiana’s stark lack of transportation planning and public transit availability. The group is called Hoosier Progress. Just this evening, we were discussing the differences between Indianapolis and Madison, Wisconsin when it came to commuting options. Madison is laden with bicycles and crisscrossed with a network of bike and foot paths that would make any city in the nation envious.
The likely root cause of this situation is geography. The heart of Madison is situated on a narrow isthmus between two lakes, Monona and Mendota. This is likely what encouraged higher population density, which in turn led to tighter city blocks on the isthmus and smaller residential properties. Madison was founded in 1836. Needless to say, there were few cars on the road and public transportation had not yet taken off. Therefore, there was a greater need to move about the city on foot.
Indianapolis is built on flat, open land, with only a river and a smattering of man-made lakes on the edge of town to determine how things are laid out. There are no natural barriers to determine the size of house lots or the shape of neighborhoods. It also means cheaper land for newer, more land-intensive housing tracts in the suburbs. Like Madison, the older parts of the city have smaller blocks, but this is a relic from a time when few people owned cars and the population was much smaller.
As a consequence of these two different city development paths, Madison has about 50 percent greater population density. The greater Madison area also has about a third the population of Indianapolis, this makes it easier to get from place to place within Madison. Madison also benefits from a comprehensive network of bicycle paths.
When considering Indianapolis’ abysmal public transportation and bicycle infrastructure, there are things to be learned from citys like Madison. Encouraging increased population density when creating or rebuilding neighborhoods can make it easier for residents to go about their day without a car.
Increasing population density would also make it easier to determine where bike paths should be laid. Currently, they are restricted to abandoned rail lines and along major waterways. A comprehensive trail network should connect neighborhood centers, residential areas, and major attractions like museums, parks, and airports.
Indianapolis still has a long way to go when it comes to building out non-automotive traffic infrastructure. However, we do not have to reinvent the wheel (so to speak.) We can look at the ways it is been successfully implemented in other places and try to apply those lessons here.
Google has begun a practice of flagging Google accounts that are being accessed from unusually parts of the world. Typically, you access your Google account from a relatively small geographic area. Home, work, and areas around your city are areas where you are most likely to log in. In response to an attack on Google’s Gmail servers in January, presumably by the Chinese government, the search company has started flagging users’ accounts if they are being accessed from abnormal parts of the world for that user.
This practice is nothing new. If your credit card information has been stolen and big-ticket items are being purchased rapidly, the credit card company will put a hold on that card and contact you. This is no different.
This is a generally positive development and should help to discourage at least a few attacks on Google’s mail servers. However, according to the Ars Technica article linked to earlier in this post, there is still a backdoor into Google’s systems via ActiveSync. Citing a blog post from Gabriel Landau at Independent Security Evaluators, it is possible to circumvent the Gmail access logs, which is how Gmail knows where it is being accessed from. One only needs proper credentials for the account in question to read and send emails with that account and no one can stop it because ActiveSync cannot be disabled like IMAP or POP can.
Assuming Google patches that gaping hole in its fence soon, I think that it is doing better to protect the security of its users from unauthorized access than it was before the Chinese attack. Call me a Google fanboy, but I was happy to see Google take action after the attack and work to make its users safer.
I am taking a break from my normal programming fare with this message about WordPress supporting the 1 for all movement. I think that we do take familiar things like the First Amendment for granted and that most people do not understand the US Constitution as well as they should. If you have not read the US Constitution lately, head on over to USConstitution.net and read up. It may a bit dry in parts, but it is the founding document of our nation and deserves a good read.
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances. Born and raised on the Texas Gulf Coast, I’ve spent the past few months trying to wrap my head around the Deepwater Horizon explosion and subsequent massive oil spill that is no … Read More
via WordPress.com News
It turns out then, when trying to bootstrap a Ruby on Rails application after pulling it down from a repository, it is really important to set up a database for the application before you try to start it. Yes, like a pony and pony food, any web application needs a database to function properly. Before you start, run
rake db:create
and
rake db:migrate
The create command will create a new MySQL database on your local machine, unless you specify otherwise. The migrate command will configure the database with all the tables and relationships that are needed for it to work properly. The configuration instructions are in the applications model and migration files.
That way, everybody is happy and you don’t look like a complete noob in front of half the development team for two weeks. Not that, uh, that has ever happened to me.
I have no idea how I missed this. English-born astrophysicist Geoffrey Burbidge died earlier this year, on January 26 at the age of 84. He was instrumental in helping to develop the now commonly-accepted theory that all elements heavier than hydrogen, including those in planets and organisms come from ancient stars.
He gained a bit of notoriety and controversy for advocating the alternative cosmological model known as the Quasi-Steady State (QSS). In a steady-state universe, matter is being created, along with space, as the universe expands. QSS is an addition to the steady-state theory that states that miniature Big Bangs, called “minibangs,” are going off constantly, even after the Big Bang 13.8 billion years ago that sparked the creation of our universe. Because these theories directly contradict established observations and these discrepancies have not been properly addressed by QSS or SS proponents, they have yet to gain any real traction in the astronomy community.
In his later years, he gained even further notoriety for proposing that extremely red-shifted quasars were not distant, but were, in fact much closer. Due to the expansion of space, objects appear to accelerate from one another faster at greater distances. Burbidge proposed that these extremely red-shifted objects were really nearby galaxies moving away from us at the relativistic speeds and not moving at those speeds because of the expansion of space.
He came to fame in astronomy by contributing to a 1957 paper that explained how any element can be synthesized from hydrogen within the cores of stars. If a star is sufficiently massive to nova or shed its outer atmosphere, it will then spread these heavier elements throughout its galaxy. This is the commonly-accepted scientific theory to explain how heavier elements came into existence and were distributed throughout the universe.
UIAutomation is a new plugin, previewed at WWDC, that will be in the version of Instruments shipping with the iOS 4 SDK. Essentially it allows scriptable testing of the UI. This is one of the few (if any) instances of Apple supporting Behavior Driven Development (BDD) in their developer programs and it is very exciting.
If you have spent any amount of time with BDD in Ruby on Rails, this should be familiar to you. If not, here are the basics. As the developer builds out new features or modifies existing ones, he or she can create simple test scripts that will be read and parsed to create a virtual interface for the application that will only be seen by the testing software. Here, it is Instruments. In Ruby on Rails, it is Cucumber.
UIAutomation makes use of JavaScript-based scripts to describe what the test should do and what it should be testing for. Unlike Cucumber, which runs in an invisible, virtual browser, UIAutomation will actually run on a development device and operate the application on the screen, for the developer to see. The team at Apple that created this plugin has come up with a way to describe UI elements and features on the screen in JavaScript.
The script will run through the tests that are specified and, as it runs, it will deliver a running report of what has happened so far. When it is done, the developer can save the results of the test session.
As someone who spent most of his summer in 2009 writing Cucumber scripts and wading neck-deep in BDD, it is a little exciting to see this kind of testing coming to the iPhone. Hopefully, it will be available for Mac development, as well. When I have the new development tools in my hands, I will give you a more detailed tutorial.
One of the most highly anticipated features of Apple’s iOS 4 is the ability to temporarily push an application’s processes to the background while another application is brought to the foreground and used. This was covered in detail at WWDC earlier this month. Fortunately, Apple was generous enough to provide videos from the conference on its iPhone developer site.
Main types of multitasking app
There are three types of multitasking app, detailed in the UIBackgroundModes key.
- Audio (This would be for an application like Pandora and would allow it continue playing music outside of the application, similar to the iPod app.)
- Location (This would monitor the phone’s position via CoreLocation and perform tasks according to the developer’s code.)
- VoIP (This would include applications like Skype and allow them to function like Apple’s “Phone” app.)
Application lifecycle
There are three states in a multitasking app’s lifecycle, Active, Inactive, and Background.
typedef enum {
UIApplicationStateActive,
UIApplicationStateInactive,
UIApplicationStateBackground
} UIApplicationState;
When the application launches, it calls the following methods from the app delegate:
-(void) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions;
-(void) applicationDidBecomeActive:(UIApplication *)application;
When the app goes to the background, we will execute the following the app delegate:
-(void) applicationWillResignActive:(UIApplication *)application;
-(void) applicationDidEnterBackground:(UIApplication *)application;
When an app is pushed to the background, it operations are suspended, save for the the functions that are desired to run in the background. For example, you would want Pandora to keep playing music and occasionally retrieve more music. You would want Skype to continue taking input from the microphone, sending output to the speaker, and remaining in contact with Skype’s servers. It is primarily the GUI-related functionality that is suspended when an app is pushed to the background.
Killing apps
Now, the iOS is not merciless when it comes to killing app processes. An app is given some time to clean up any processes that are not intended to run in the background. There, its state is sitting in volatile memory.
Because paging memory to the disk is not allowed, if system resources are needed for an active application, any background application can be killed by the OS. When it is killed, it is again given some time to clean up. For example, an app might need to finish a download or safely disconnect from a server. This can be done with the following methods:
-(UIBackgroundTaskIdentifier)
beginBackgroundTaskWithExpirationHandler:(void(^)(void))handler;
-(void) endBackgroundTask:(UIBackgroundTaskIdentifier)identifier;
The first line of that code will tell the application delegate to move the app to background status along with some instructions on how to handle being terminated while there. The method endBackgroundTask: essentially kills the background task it is given as an argument.
Closing remarks
So, that’s about it. Apple seems to have come up with a system for background processes that is pretty straightforward. The OS will decide for you if and when a background app is to be terminated. It takes only a few lines of code to get started with this stuff. Apple has posted the video of this talk, along with the slides. (It is in the video “Session 101 – What’s New in Cocoa Touch.”) All of the code that you see here came from that talk. I hope all this was helpful.
Is there any indication we shouldn’t be depressed? Are you living on the same planet that I am? Do you ever think that depression might be the reasonable human response to the crap we’re going through as a species, meant to propel us into the next evolutionary step or, at least, into taking some different course of action, so that we might survive? Do you ever think that maybe it’s the happy people that are really screwed up in the head?
-Marc Maron
Check out Maron’s original routine on having a manic depressive father. It’s actually really funny.
Indiana University-Purdue University at Indianapolis is an urban campus shared by Indiana University and Purdue University, two large, well-funded public education institutions. There are Schools of Computer Science, Computer Information Technology, and Informatics. IU’s University Information Technology Services does an excellent job of supporting students on all of IU’s campuses. (I am not just saying that because I work for UITS.)
However, despite all the up-to-date computer labs with dozens of computers, free software deals from Microsoft and Adobe, and 24/7 technical support, IU seems to be lacking one thing: open source. There is some Linux/UNIX software available through IU’s software site, IUWare. However, the amount of Linux software there is far outmatched by the software available for Mac and Windows.
Indiana University has deals with several software vendors, in particular Microsoft and Adobe. These corporations provide free software to faculty and students in the hopes that they will continue to use their respective software after graduation. A copy of Adobe CS5 Design Premium can cost as much $1,900. A Microsoft Office 2008 license can cost at least $150. OpenOffice may not be as feature-rich as Microsoft Office, but it would certainly get the job done for 99% of users and it’s free.
Unless it is detailed in IU’s agreement with Microsoft and Adobe that it not push open-source options too hard, I do not see why it should not become a bit more open about open source. At the very least, it is free software that the University will not have to haggle over every few years.
There. That was my first rant over open source. I will get hate mail.
I had to write about this. This may piss off some iPhone case makers. Apple’s newly-announced iPhone 4 is using the same scratch-resistant tempered glass on the back as it is on the front.
Any iPod or iPhone owner could tell you that the polished backs of all of these devices have had a difficult time with tiny scratches. These devices always look so shiny and beautiful when they come out of the box for the first time, but then they are tarnished by life in the real world, (just like people).
I do not think this blog post exists for any reason beyond my excitement that I may own an iPhone 4 (or possibly iPhone 5) and that it will not need a case the way my 3GS does now.