iNavX™ - Marine Navigation for iPhone (3G with GPS)
Links: GPS + Apple Mac + iPhone
façade pattern
Java: Date manipulation
public static Date getNextHour(Date date)
{
Calendar cal = new GregorianCalendar();
cal.setTime(date);
cal.add(Calendar.HOUR, 1);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MILLISECOND, 0);
Date time = cal.getTime();
return time;
}
Single Purpose Principle
- Interfaces
- Classes
- Methods
- Whole Modules
Electric Motor Conversion
http://www.thunderstruck-ev.com/sailboatkit.htm
http://www.electricvehicleswa.com/boats.php
Thunderstruck Motors ~ Electric Sailboat motor Kit. Mars Brusless motor with Sevcon PMAC millipak regen controller
Contract for the boat sale
STATE OF ILLINOIS COUNTY OF ________________
THAT I, ________________________________________________ [seller's name], ("Seller"),
($_________________), do hereby sell and transfer
in the County of ________________, Illinois:
Model:
Year:
Length:
Previous Title (# and owner name on title):
General Boat Type:
Engine Number:
Engine/drivetrain description:
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
INVENTORY OF EQUIPMENT. The Seller represents that the Boat contains the following equipment:
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
[In the lines above, include a description of the Boat's equipment, such as any deck equipment, electronics, navigation equipment, safety equipment, sails and rigging.]
whatsoever in relation to this bill of sale.
DISCLAIMER OF ALL OTHER WARRANTIES. OTHER THAN THE SELLER'S WARRANTY OF OWNERSHIP STATED ABOVE, THE BUYER TAKES THE BOAT, ENGINE(S), AND EQUIPMENT "AS-IS" WITHOUT ANY WARRANTIES, EXPRESS OR IMPLIED, AS TO THEIR CONDITION. THE BUYER HAS PERSONALLY INSPECTED THE BOAT, ENGINE(S), AND EQUIPMENT AND ACCEPTS THEM "AS-IS".
ADDITIONAL TERMS OF SALE.
________________________________________________________________________________
________________________________________________________________________________
________________________________________________________________________________
Seller:
Driving license number:
________________________
Signature
Printed Name: _______________________
Buyer:
________________________
Signature
Printed Name: _______________________
STATE OF ILLINOIS COUNTY OF ________________
SWORN TO AND SUBSCRIBED BEFORE ME, this the ____ day of ________________, 20____.
____________________________
NOTARY PUBLIC
My Commission Expires: ________________
Learning Sailing: mainsail
http://www.youtube.com/watch?v=5byPfsCmd8M&NR=1
adjusting the sail shape:
http://www.youtube.com/watch?v=iZ7tmosvPTI&feature=related
boom vang:
http://www.youtube.com/watch?v=W9cmwySbS2g&NR=1
Learning Sailing: hiking out
It shows the idea of cross-sheeting and a nice combination of the winch and the cleat.
http://www.youtube.com/watch?v=kf8ihMZEAGc&feature=related
Lake Superior pictures
Another great picture and place:
http://www.lighthousefriends.com/light.asp?ID=729
Lake Huron, Georgian Bay, Canada picture
another:
sealing the deck of the sail boat
- 3M 4000UV adhesive sealant around the screw hole perimeters
- 5200 caulking
keep in mind that caulking does not adhere to stainless steel
Bibliography:
http://www.yachtsurvey.com/DeckLeaks.htm
Learning Sailing: Coming About or Tacking
The main sail changes sides on it's own, don't touch it, watch your head. The boat hast to have momentum (be moving) to execute this maneuver.
1) say "Ready about?!"
2) the crew answers "Ready!"
3) move the tiller and say "Hard to lee!" (opposite of the wind)
4) release the leeward Jib sheet (line)
5) straighten the tiller, once past the direction of the wind
6) tighten the leeward jib sheet (wind switched sides)
watch the video:
http://www.youtube.com/watch?v=fTZw2mPm5FU&NR=1
Learning Sailing: Stopping the boat upwind.
Portable GPS
Unix: how to check time and date
$ dateWed Jul 23 09:33:29 CDT 2008
Irwin 28. Electric Motor
Irwin 28: Lil Walkabout: Converting to outboard?
I found a couple of pictures of Irwin 28 with the outboard motors.
This admittedly does not make the sailboat any prettier, but it helps with:
- no oil in the bilge,
- no fumes inside,
- no noise inside,
- lots of extra room for additional batteries, sails even future electric motor
I found these articles:
http://www.onlineoutboards.com/article_choosing_outboard_hp.html
- 4 stroke
- 2 cylinder
- 12-volt charging
- deep (long) prop
28' Irwin 1974
This info is for people like myself who spend a lot of time researching the web and finding very little on this particular sailboat.
L.O.A 28.5 feet
L.W.L 22.6 feet
Draft with keel/centerboard 3' to 7'3"
Sail area 394 sq. ft.
Hull fiberglass
Displacement 7,900 lbs.
Ballast with keel 3,000 lbs lead (my boat)
Ballast with keel/centerboard 3,200 lbs lead
Headroom 6'2"
Number of berths 5
Engine Universal Atomic 4 - 30hp
Engine Volvo Penta 2 cylinder (my boat)
Please post any corrections. I will be happy to hear for all the owners, I will be very happy to post any stories realted to the Irwin 28, Great Lakes, or sailing in general.
Chicago yachting life
Book: "The Long Way" by Bernard Moitessier
I highly recommend it.
Here is the book's review:
The Long Way recounts the incredible story of Bernard Moitessier's participation in the first Golden Globe Race a solo, non-stop circumnavigation rounding the three great Capes of Good Hope, Leeuwin, and the Horn. For seven months, the veteran seafarer battled storms, doldrums, gear failures, and knock-downs, as well as overwhelming fatigue and loneliness. Then, nearing the finish with victory in hand, Moitessier suddenly pulled out of the race and sailed on. His 37,455-mile journey continued for another three months, finally ending in Tahiti. Never once in all that time had he touched land.
Support this site: click on the image an buy this book via Amazon.com
North Lake Michigan
http://maps.google.com/?ie=UTF8&ll=45.456278,-86.077881&spn=1.539328,3.482666&t=h&z=9
100th race Chicago to Mackinac Island
Official site:
http://www.chicagoyachtclub.org/racetomackinac/
http://www.globesports.com/servlet/story/RTGAM.20080719.wsp-mackinacrace0719/GSStory/GlobeSports/home
Please leave comments with good links and any news.
Fastest time was Stripes 48 hours 17 minutes and 10 seconds
28' Irwin
See the pictures:
The rear of the boat:
The forward V-berth:
The galley (alcohol burner, ice box in the background):
The starboard side settee:
The port side settee with the folding table on the wall:
The main power switch and the rear berth:
The autopilot unit:
Ambiguous Method Result
/** @deprecated TODO: this bad code, do not use it */
public TeamGame fetch(Game game)
{
Query query = getSession().createQuery("select gameSummary from TeamGame gameSummary where teamGame.game.id = " + game.getId());
List list = query.list();
if (list != null && list.size() > 0) { return (TeamGame) list.get(0); }
return null;
}
/** @deprecated TODO: this bad code, do not use it */
public TeamGame fetch(Game game)
{
Query query = getSession().createQuery("select gameSummary from TeamGame gameSummary where teamGame.game.id = " + game.getId());
List list = query.list();
if (list != null && list.size() > 0) { return (TeamGame) list.get(0); }
return null;
}
Use static methods whenever possible
private String getDayPlaceList()
{
Game game = winnerTeamGame.getGame();
String isDayOrNight = ((getHour(game)) > 17) ? " night at " : " at ";
return (getDayOfWeek(game.getStartDate()) + isDayOrNight + game.getLocation());
}
private static String getDayPlaceList(TeamGame teamGame)
{
Game game = teamGame.getGame();
String isDayOrNight = ((getHour(game)) > 17) ? " night at " : " at ";
return (getDayOfWeek(game.getStartDate()) + isDayOrNight + game.getLocation());
}
If Buddha had a clock...
I re-wrote my older article, I think it is worth re-posting it:
http://uki.blogspot.com/2007/07/is-it-mindful-or-wasteful-15-minutes.html
SQL: CONCAT(), GROUP BY and DATE formatting
SELECT
(CONCAT( MONTH(date_time), "/", DAYOFMONTH(date_time) ,"/", YEAR(date_time))) as date,
COUNT(*) as visits
FROM metrics_session mGROUP BY YEAR(date_time), MONTH(date_time), DAYOFMONTH(date_time);
"Did you find this post useful? Sponsor marathon for cancer"
Programming visualization exercise
The "if()" statements would be the corners where you make decisions on where to turn.
The classes would be the buildings and the method interfaces the doors you would enter.
The bags you carry into these doors would contain the objects you need.
Oh, and the "Windows" would be the "exceptions" you would use to jump out off when everything goes bad.
~ Sorry, I had to put it in, I am a Mac guy.
iPhone and Android
I tested a few of them, but I will mention about that later...
First, I want to thank Google for creating Android.
Because of Android we have iPhone SDK, even if this is not 100% true, at least the prospect of thousands of Android developers made it easier for Apple to release it.
We also now have iPhones that are half the original price ($199) - probably to win the public before public learns that there is a real competition out there.
Most of all the intense competition will force both sides to strive for better solutions, and both of the sides win (sorry Winblows Mobile, Palm OS, CrackBerry you don't count anymore).
Why Android?
1) Java API - that fact alone wins Android for me, and thousands others, Apple really mess me up with Objective-C. Hear me out Apple: Java API, and if you want a clean, modern, dynamic language, use Groovy for JVM.
2) Linux core for stability and ability to run on multiple platforms (personally I love OS X UNIX core)
3) great user interface; mostly rip off from iPhone, but I cannot blame them -- there is nothing better out there.
I have a feeling that in some unexpected way there will be a bridge between the two, most likely Android Java apps running on top of iPhone (Java VM coming to the phone near you very soon).
Now, back to iPhone 2.0.
Steve Jobs is a very smart guy (OK, that is a severe understatement). He wanted to control three things, of which he mentioned only two: the quality of hardware and software.
Since Android will not control the hardware quality (open source), I expect that it will be hit-or-miss, some good, some bad. Just like Linux. I hope the big handset manufacturers (Nokia) offset the bad ones.
This brings me to the second control point, the software. The software from Apple is amazing, I had Treo before (Palm OS yuck!).
As I said before I downloaded a 3rd party AIM chat application, one of the most downloaded today and it crashes for most users!!!
This is precisely why Steve Jobs wanted iPhone to have Apple apps only, for the initial launch, smart guy. Android will have no control on quality of the apps, but hopefully they will get the market share.
Then there is the 3rd thing that Steve Jobs wants to control. Money. Almost every piece of good software written for iPhone (except for jailbreak.app) makes money for Apple directly (30% of the cost) or indirectly (iTunes traffic). Google may make more advertising money, but there is no money for them in Android, it is open source, so people can write and install their apps without asking Google, or anybody else.
I think it is worthwhile for us Java developers to learn Android, meanwhile I hope this article is formatted well on your iPhone.
Book "ProBlogger" by Darren Rowse and Chris Garrett
Although I've been blogging for most of the last seven years, this book provided many useful tips that helped me give my blog direction.
Buy on Amazon: https://amzn.to/3JnkAqh
My iPhone Diary
iPhone and Java...
>http://weblogs.java.net/blog/brunogh/archive/2008/05/java_on_iphone.html
Hello World, Android!
MYISAM vs. InnoDB
SET NAMES utf8; SET FOREIGN_KEY_CHECKS = 0; ALTER TABLE table_name1 TYPE = innodb; ALTER TABLE table_name2 TYPE = innodb; SET FOREIGN_KEY_CHECKS = 1;
Java: generic replace all method
public static String replaceAll(String phrase, String token, String replacement)
{
if (phrase == null || phrase.length() == 0)
return phrase;
if (token == null || token.length() == 0)
throw new IllegalArgumentException("The token you are looking for cannot be empty.");
if (replacement == null)
replacement = "";
int start = phrase.indexOf(token);
if (start == -1)
return phrase;
log.warn("Phrase: \"" + phrase + "\" token found at: " + start);
int end = start + token.length();
phrase = phrase.substring(0, start) + replacement + phrase.substring(end, phrase.length());
phrase = replaceAll(phrase, token, replacement);
return phrase;
}
Hibernate: disjunction
Junction junction = Expression.disjunction();
junction.add(Expression.or(Expression.eq("plurality", phrase.getPlurality()), Expression.eq("plurality", Constants.PHRASE_NEUTRAL)));
dcPhrase.add(junction);
Hibernate: detached criteria
DetachedCriteria dcSport = DetachedCriteria.forClass(PhraseSport.class);
dcSport.add(Expression.eq("sport.id", phrase.getSportId()));
List
sports = hibernateList(dcSport);
SQL: update statment
update team set is_plural = true;
JUnit class not found (not loading) in Eclipse
Class not found com.ucc.csd.server.PhraseGeneratorTestjava.lang.ClassNotFoundException: com.ucc.csd.server.PhraseGeneratorTestat java.net.URLClassLoader$1.run(URLClassLoader.java:200)at java.security.AccessController.doPrivileged(Native Method)at java.net.URLClassLoader.findClass(URLClassLoader.java:188)at java.lang.ClassLoader.loadClass(ClassLoader.java:316)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)at java.lang.ClassLoader.loadClass(ClassLoader.java:251)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:683)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:425)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Running a single test class with Maven2
GWT + iPhone == Pretty Tasty - Google Web Toolkit | Google Groups
Mysql installation on Mac
Hibernate equals(); hashCode(); toString() methods
SVN: commands
svn checkout svn://**.***.*.**:port# projectNameworkspace/$ svn checkout svn://x.240.1.10:3692/CSD csdA csd/pom.xml...
My favorite quotations..
“A man should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.” by Robert A. Heinlein
"We are but habits and memories we chose to carry along." ~ Uki D. Lucas
Recommended pages
Popular Recent Articles
-
Subclade R1b1b2a1a1d1* (23andMe.com nomenclature) or R1b1a2a1a1a4 (FTDNA nomenclature) is a men linage descended from the region that wa...
-
When trying to open the database you may get the following exception: java.sql.sqlexception: [sqlite_error] sql error or missing database (n...
-
I have noticed a very unsettling statistic on my blog. This prompted a fascinating question about AI, blogs' future, and maybe even the...
-
That is a good, if not easy, problem to solve! In the result, I would like to take the following code in <blockquote> tag function fol...
-
AIKO - "The Child of Artificial Intelligence" (in Japanese "ko" means child; "ai" means love denoting the ...
-
O'REILLY 201 0011 031 10110100180 000110111 01100041 001100010010000 5011011001010 1101110011 000100000 00000 10 1000012 Escaping the Bu...
-
On the mobile, the page is hard to read so I am including a LINK to Google document ...
-
This example shows you how to format a number based on user's language and region setting (LOCALE) /** * This method updates th...
-
Recently, I have been thinking about a new lever-action rifle. The appeal of these late 1800 models is that they are great, very light (5lbs...
-
Work Pressure! I am managing a project where budget is very (read insanely) small, deadlines are even worse, and most of the time it feels l...