Technology

First Impressions of Dart

Today I finished my first Dart tutorial.  For those that don’t know what Dart is, Wikipedia has a nice synopsis that I’ve included here.

Dart is an open-source Webprogramming language developed by Google. It was unveiled at the GOTO conference in Aarhus, October 10–12, 2011.[4] The goal of Dart is “ultimately to replace JavaScript as the lingua franca of web development on the open web platform”,[5] but Dart currently relies exclusively on its cross-compilation to JavaScript feature in order to run in mainstream browsers. Dart is intended to address issues with JavaScript that Google engineers felt could not be solved by evolving the language, while offering better performance.[5] Google works on Dart to help it build more complex, full-featured client-side Web applications.[6]

Dart is a class-based, single inheritance, object-oriented language with C-style syntax. It supports interfaces, abstract classes, reifiedgenerics, and optional typing. Static type annotations do not affect the runtime semantics of the code. Instead, the type annotations can provide documentation for tools like static checkers and dynamic run time checks.

Wikipedia

While the tutorial was simple and designd to be completed in about an hour, I found it a worthwhile and informative endeavor.  It was just enough to give an introduction to the language and syntax.  As the above snippet from Wikipedia states, Dart cross-compiles into JavaScript and should be familiar to people who know another C-style language.

I have a high degree of experience with object-oriented design, C++, and JavaScript and Dart has left me with a good first impression.  I believe an important aspect of Dart is that it could be used to bridge the gap between C-style languages and JavaScript for programmers who do not have a lot of JavaScript experience.  I do not believe that Dart will ultimately replace JavaScript, as Google hopes.  JavaScript, while it has shortcomings, is ultimately very powerful and flexible.  Dart’s ultimate utility will be something akin to CoffeeScript that is making it easier and less tedious to write JavaScript.  In the coming weeks I may delve further into Dart, though up next I will probably do a tutorial or two on Rust.

Links: Dart 1-hour tutorial

Posted by Chad Dotson in Programming, 1 comment
My First Raspberry Pi Project

My First Raspberry Pi Project

View of the whole setup

View of the whole setup

Almost every year, I try to select a fun project to do while off for Christmas. This year the project I selected was based on Raspberry Pi.  Specifically I decided to build a device that would, when motion is detected, find the range to the motion using an ultrasonic rangefinder, take a picture using the camera module, and finally email me the results.

After just a few hours of work, I had separate proofs of concept working for each sensor written in Python.  A short time after, I started combining all the proofs of concept into a consolidated script which I got working.  Right now I am perfecting the classes for interfacing with the range finder and the motion detector and I am currently using picamera 0.8 for interfacing with the camera module.  I’ve included a link to the git repository I’m using for source control below.

Equipment:

  • Raspberry Pi Model B
  • Raspberry Pi 5MP Camera Board Module
  • HC-SR501 Human Sensor Module Pyroelectric Infrared
  • SainSmart HC-SR04 Ranging Detector Mod Distance Sensor
  • 5 180 ohm resistors
  • Breadboard and miscellaneous connectors

Source Code: https://github.com/chaddotson/PiPy

 

Posted by Chad Dotson in Featured, Hobbies, Neat Stuff, Raspberry Pi, 0 comments
The Early Days of Flight

The Early Days of Flight

This post started from a comment I made on facebook about the “Volocopter” story on CNN.  At the time my comment was “Why does this look like something from the early days of flight?”  That it turns out is a very good question and an even better follow-up, “Aren’t we in the early days of [motorized, human] flight?”About 50,000 years ago, humans reached what is called behavioral modernity[1], “the point at which Homo sapiens began to demonstrate an ability to use complex symbolic thought and express cultural creativity”[2].  I think that is the reference point I will use for this post.  Am I leaving something out?  You bet, a heck of a lot in fact.  Another reference point I considered using was the control of fire by homo-erectus 400,000 years ago[3].  I ultimately decided on using the data of behavioral modernity because even after tens of thousands of years separating, those humans are us both anatomically and behaviorally.  We’ll use this timeline of “modern humanity” throughout this post.

So back to the topic of the post:  “Aren’t we in the early days of [motorized, human] flight?”  I believe the answer is a very resounding “yes.”  If we think about history of boat/shipbuilding, I believe can get a feeling for how new it is.

Let us compare two examples of what humans have created at the endpoint’s of “modern humanity.”  At between 9,523 and 10,053 years old the Pesse Canoe is thought to be the world’s oldest boat[3].  The Pesse Canoe is a simple, dugout canoe discovered in the Netherlands.  Fast-forward approximately 10,000 years to the USS Gerald R. Ford (CVN-78) slated to launch in 2015[4] which will be the most advanced ship built by human-kind at the time of its launch.  We, all to often find ourselves bounded by the technological achievements since the beginning of the space race, but that’s 10,000 years of well-earned technological achievements.  I’m sure that somewhere here there is a Moore’s Law of human ability (I say ability because I don’t feel intelligence nor ingenuity to be the right word).  That ability is based on what knowledge we have gained up to that point in time.

First Flight on December 17, 1903

First Flight on December 17, 1903

So now that we’ve talked human technological advances in boat/ship building, let us think about what brought us here, human flight.  Rudimentary usage of the science (understood or not) behind flight have been understood for anywhere between 2,000 and 2,500 years[6] but it wasn’t until Leonardo da Vinci’s drawings in the late 1400’s that humanity really started showing an understanding of the concepts behind flight.  For the most part, Leonardo’s best flight related discoveries were because he studied and tried to copy nature.  While successful attempts in winged human flight have been made as far back as the first millennium AD, it was 1903 when the Wright Brothers (credited) finally achieved winged, motorized flight.  In the 110 years since we have constructed advanced aircraft such as the Airbus A380.

As it turns out, there are a lot of significant inventions marking the timeline of human creations.  So much so I believe it is necessary to add “when a technology becomes useful” as a simplifying assumption to my statement.  Under that premise, our current capability in shipbuilding is based on 10,000 years of progressive technological advances and while our current capability in motorized flight is based on the culmination of thousands of years of technological advancement, its only been 110 years since we put it all together.  So, the answer is yes, we are in the early days of motorized, human flight.

Disclaimer: I am a computer scientist not a writer or history scholar.  This post is a collection of what I believe and what I’ve put together from the internet.

References:

  1. “Behavioral modernity.” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., date last updated (8 November 2013). Web. Date accessed (27 November 2013). http://en.wikipedia.org/wiki/Behavioral_modernity
  2. “Human.” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., date last updated (26 November 2013). Web. Date accessed (27 November 2013). http://en.wikipedia.org/wiki/Human
  3. “Control of fire by early humans.” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., date last updated (24 November 2013). Web. Date accessed (27 November 2013). http://en.wikipedia.org/wiki/Control_of_fire_by_early_humans
  4. “Pesse canoe.” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., date last updated (27 February 2013). Web. Date accessed (27 November 2013). http://en.wikipedia.org/wiki/Pesse_canoe
  5. “USS Gerald R. Ford (CVN-78).” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., date last updated (22 February 2013). Web. Date accessed (27 November 2013). http://en.wikipedia.org/wiki/USS_Gerald_R._Ford_%28CVN-78%29
  6. “History of aviation.” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., date last updated (24 February 2013). Web. Date accessed (27 November 2013). http://en.wikipedia.org/wiki/History_of_aviation
  7. “Early flying machines.” Wikipedia: The Free Encyclopedia. Wikimedia Foundation, Inc., date last updated (27 February 2013). Web. Date accessed (27 November 2013). http://en.wikipedia.org/wiki/Early_flying_machines

 

 

Posted by Chad Dotson in Misc, Ramblings, Technology, 0 comments
The Final Apollo Mission – December 7, 1972

The Final Apollo Mission – December 7, 1972

Apollo 17 Liftoff - December 7, 1942

Apollo 17 Liftoff – December 7, 1942

On December 7, 1972 (41 years ago today) the final manned mission to the moon blasted off from Kennedy Space Center.  Eugene Cernan was the last person to walk on the moon on December 14, 1972 at roughly 05:40 GMT. It is ultimately hard to believe that its been 41 years and we’ve not had a manned mission to Mars yet.  Even more astounding is the fact is that at this time we are between the Space Shuttle and its replacement, so we have no currently operational mode of launching humans into space.  The Orion capsule is currently under development and approaching ETF-1 (Exploration Flight Test-1), but that is scheduled for late 2014.

I got interested in the total time spent on the surface (just EVA’s for the Apollo missions) of of the Moon, you can find the figures on the table below.  You can tell by the figures when the Apollo missions started using the lunar rover.  I’ve also included drive distance of NASA’s Mars rovers.

Mission Surface EVA Surface Distance Covered
Apollo 11 2:31:40 Negligible
Apollo 12 7:45:18 2.0 km (1.2 mi)
Apollo 14 9:22:31 3.3 km (2.1 mi)
Apollo 15 19:07:53 27.9 km (17.3 mi)
Apollo 16 20:14:14 26.7 km (16.6 mi)
Apollo 17 22:03:57 35.74 km (22.21 mi)
Sojourner 100 m (330 ft)
Spirit 7.73 km (4.8 mi)
Opportunity 38.70 km (24.05 mi) – Ongoing
Curiosity 1 km (0.6 mi)+ – Ongoing

I leave you with this entry in the Sagan Series titled the “Gift of Apollo.”

 

References:

 

 

Posted by Chad Dotson in Misc, Ramblings, Technology, 0 comments

Red Bull Stratos

Watch the world record freefall from the edge of space live right now.  (video embedded)

 

More information:  http://www.redbullstratos.com/

 

Posted by Chad Dotson in Neat Stuff, Space, Technology, 0 comments

Presentation Is Everything

PRESENTATION IS EVERYTHING

There is something that learned over the past couple of years, presentation is everything. It is quite possibly the most important element in all we do.

Presentation from the aspect of leadership can mean the difference between shared vision and unengaged worker bee. Presentation from the aspect of a product ( in my case software product) means the difference between phenomenal success and utter failure of a product.

In short, no matter how good or revolutionary your product is, if it looks bad, it will fail. To have a physical product example, look no further than the current mobile phone market. Look at two products: one you like and one you hate. What are the specs of each one? Are they comparable or does one have an advantage over the other. Now, for arguments sake, lets say the more “cool” one has a better physical appearance and a more flashy user interface but the one that is less “cool” looking and has a plain user interface has better specs and capabilities, which one would you buy? I’m betting (and society proves) that the “cooler” one with the more flashy interface wins out more than the other device. I’ve got no facts in front of me to prove this directly, only experience and my own beliefs.

FIXING OUR SOFTWARE

So how do we fix our software? Well here are some design concepts to keep in mind.

  1. The API and/or the user interface for software must be intuitive.
  2. The software features must be discoverable. This means that users can learn to use the software by using the software. There is not a need for an involved manual to pick up the software and begin using it.
  3. The software must be easy to use. This is an ambiguous and loaded statement I know, but never-the-less it must be true. Just think about the software you are writing from the user’s perspective.

These are some of my most important concerns for a software product because if a user cannot easily pick up your software and start using it immediately, then you will have problems with adoption within your targeted user base. As with the mobile phone example above; if you have two pieces of software equivalent in terms of capabilities and specs, but one is presented a lot better and is more user friendly, which would you choose?

Going Forward

What we’ve learned here can be summed up in the two following statements. Software must be intuitive, discoverable, and easy to use. Also, presentation and appearance are quite possibly the most important part of software.

Posted by Chad Dotson in Doing Things Better, Featured, Key Concepts, Software Engineering, 0 comments
DNS Changer And What It Means To You

DNS Changer And What It Means To You

With all the fear mongering by the news outlets, I thought I’d make a short post about DNS Changer.

DNS Changer is malware that if you are infected it changes how your computer looks up website addresses.  Essentially, it tells your computer to use a service setup by criminals.  The criminals behind DNS Changer have since been caught, but with far reaching implications, arrangements were made to turn the criminals’ service into a short-term legitimate service.  Monday that service will be turned off.

To make sure you’re not infected, goto this site setup to be a quick test: http://www.dns-ok.us/.  If the result is Green, you are ok and have no need to worry.

If the test fails. you will need to go here: http://www.dcwg.org/fix/.  It contains directions and links required to get your computer fixed.

For more information, goto the DNS Changer Working Group (http://www.dcwg.org/)

Posted by Chad Dotson in Featured, Tips, 0 comments

FFMPEG Improperly Switching to Grayscale

I use ffmpeg to make timelapse movies of images taken from one of my several webcams.  Recently, I started having trouble with it converting all the frames of my video to gray scale.  I’m am unsure if a software upgrade or a script change caused it, but I had a heck of a time tracking it down.

This is the gist of what the message ffmpeg was giving me: “Input stream #0.0 frame changed from size:” … “fmt:gray”. There are virtually no resources out there that mention that exact phrase, but after scouring the web for a few weeks off and on, I finally found a website mentioning a similar experience and it had a solution. To solve the problem, use ImageMagick’s convert utility with “-type TrueColor” in the options list. The example below is in my timelapse bash script. This will stamp the date and time onto the top of the image and save it into my temporary directory.


convert $FILE -bordercolor Black -border 20x20 -gravity north -crop 640x500+0+0\! -gravity NorthWest -font /usr/share/fonts/truetype/freefont/FreeMonoBold.ttf -pointsize 16 -type TrueColor -fill white -annotate +10+0 "$TIMESTAMP" $TEMPDIR/$(basename $FILE)

As I mentioned earlier, I found the hint at the solution I needed here: Source.

Posted by Chad Dotson in Technology, Tips, 0 comments