Wednesday, June 22, 2011

Five Word tips that could change your life | TechRepublic

Five Word tips that could change your life | TechRepublic

Wow, I love these tips!
1. vertical text selection: hold alt key down
2. Use ctrl-z to remove autocorrect stuff
3. Use --- for horizontal line. See also ~~~, ___, ***, ===, ### for other styles. Again, use ctrl-z to remove if accidentally created
4. Move text (in table, a row, else a block of text). Click, then Hold alt-shift then use the arrow keys
5. Save All. Hold shift. Then pull down File menu. Save All appears.

More quickies:
Keystroke Function
Ctrl + Shift + D Double underline the selected text
Ctrl + ] Increase the size of selected text by 1 point
Ctrl + [ Decrease the size of selected text by 1 point
Ctrl + Shift + A Make selected text all caps
Ctrl + = Toggle subscripting for selected text
Ctrl + + Toggle superscripting for selected text
Ctrl + Shift + Q Apply Symbol font to selected text
Ctrl + Shift + N Apply Normal style to current paragraph
Ctrl + Alt + 1 Apply Heading 1 style to current paragraph
Ctrl + Alt + 2 Apply Heading 2 style to current paragraph
Ctrl + Alt + 3 Apply Heading 3 style to current paragraph
Ctrl + Shift + L Apply List Bullet style
Ctrl + 0 (zero) Apply or remove space above current paragraph
A line break Shift+Enter
A page break Ctrl+Enter
A column break Ctrl+Shift+Enter
An optional hyphen Ctrl+- (hyphen)
A nonbreaking hyphen Ctrl+Shift+- (hyphen)
A nonbreaking space Ctrl+Shift+Spacebar
A copyright symbol Alt+Ctrl+C
A registered trademark symbol Alt+Ctrl+R
A trademark symbol Alt+Ctrl+T
An ellipsis Alt+Ctrl+. (period)
An em dash Alt+Ctrl+\
An en dash Ctrl+- (on numeric keypad)
The page number Alt+Shift+P
The current date Alt+Shift+D
The current time Alt+Shift+T
Keystroke Function Notes
Shift + F3 Toggles through capitalization options. This one isn’t perfect — for instance, it insists on capitalizing articles and prepositions in Title Case mode — but it’s still a big timesaver.
Ctrl + Shift + N Applies the Normal style. If you work with documents that are riddled with obscure and specialized styles (typically other people’s), it’s handy to turn them into Normal paragraphs on the fly.
Ctrl + Shift + C Copies the formatting of selected text. Once you’ve copied the format, you can press Ctrl + Shift + V to paste the formatting onto a new selection. Yeah, I know — Format Painter does this, too. But Format Painter forgets the formatting as soon as you’re finished with it. This shortcut remembers what you copied until you close out of Word.
Alt + F9 Toggles the display of field codes on and off. Unless you work with field shading turned on — and I don’t know many users who do — you can’t necessarily tell what’s literal text and what’s being generated by an underlying field code. A quick peek using this shortcut can prevent the headache of inexplicable changes and unwanted editing consequences.
F4 Repeats your most recent action. This might be the all-time best shortcut (except for Undo, which I’m not including in this list because for me, at least, it’s like breathing and requires no conscious thought). The F4 shortcut will repeat nearly all the actions you take on document text: typing: formatting, deleting.It will also let you repeat the action of adding or removing table rows, but it isn’t well implemented with tables overall. For instance, changing table properties is not replicable via this shortcut.
Ctrl + H Opens the Find And Replace dialog box with the Replace tab selected. Replace functionality is my constant companion, so this one is essential for me. Ctrl + F opens to the Find tab if you just want to locate something in a document (or make sure something isn’t in there).
Ctrl + drag text or an object Creates a copy of the text or object. Apologies to the keyboard purists, but this useful trick does require mouse action. It’s handy when you need to copy an object and control where that copy ends up. For example, a picture or other object that has certain positioning attributes may land in some unpredictable location if you use the standard copy and paste functions. This shortcut lets you drag it exactly where you want it.Just make sure you drop the text or object before you release the Ctrl key or Word will move the original instead of copying it.
BONUS: If you hold down Shift along with Ctrl as you drag, Word will keep the copy aligned with the original.
Ctrl + Q Removes paragraph formatting that isn’t part of the style assigned to a selected paragraph. When you want to strip out manually applied formats and return to only those characteristics defined by a paragraph style, this is the quickest way to get there. Ctrl + Spacebar works the same way for character formatting.
Ctrl + 0 (zero) Applies or removes 12 points of space above the current paragraph. This sounds a little lame, but you can improve readability of selected text in about two seconds using this trick. For instance, table text is often jammed up against top borders. Select the table and hit Ctrl + 0 and you’ll get an instant improvement.
Alt + drag the mouse vertically Make a vertical text selection. Another keyboard/mouse hybrid, this one is obscure but useful. Some users have trouble making it work, but the problem is usually sequence. Just make sure you press Alt before you press the mouse button and drag. Then, release Alt before you release the mouse button.

Security or convenience: Does it have to be a choice? | TechRepublic

Security or convenience: Does it have to be a choice? | TechRepublic

Parno's thesis "Trust Extension as a Mechanism for Secure Code Execution on Commodity Computers "is that we can make security more convenient by leveraging the security possessions we have - the Trusted Computing Module in my thinkpad, the new Flicker architecture in the latest x86 architecture, a USB keyfob.
We specifically ask for elevations of security when we need it, not the all-in-one approach of logging in.
Finally, remote execution via Yao’s Garbled Circuits and homomorphic encryption.

nice thesis

Wednesday, June 08, 2011

Eclipse Helios vs Netbeans 7 for PHP development

I'm currently trying to install PDT on top of Eclipse WTP Helios SR2 for university. Pain trying to set up minimal configurations.
This guy's blog has a very good compare and contrast between them!

Sunday, May 01, 2011

xkcd: Fairy Tales

xkcd: Fairy Tales

I like the "Inductive White and the (n-1) dwarfs"
or the "lim[x->infinity] (x) Little pigs" fairy tails seem a bit weird...

or the time management comic: http://xkcd.com/874/

Friday, March 18, 2011

The dead grandmother syndrome

being an academic, I get to see bright and enthusiastic students every day who cheer me up with their joy, their views of life and wonder at the future. .... except...

now I am also the course coordinator for the BSc(Information Technology) and academic advisor for the faculty of engineering and IT for IT undergraduates. This means, apart from my normal teaching and research workload, I have the additional joy of dealing with special considerations, misconduct appeals, exclusion "suspension" appeals, heaps of paperwork and administrivia and ... blarghhh!!!

Normally it's great. But one thing I have noticed (and my fellow coordinators and directors) is the dreaded .... drumroll ... DEAD GRANDMOTHER SYNDROME.

It seems that for some unknown reason, grandmothers start to get sick just before the final assignments are due at the end of semester, then die just before the exam. In fact, sometimes students claim all 5 grandmothers   have died over their past 3 years at uni. Oh, wait, was that the other grandma? Oh, sorry, we don't have death notices or records in vietnam. Oh, I meant my girlfriend's grandmother.

But seriously, here is a paper on the dead grandmother syndrome, also called the "The Toadstool Waxing Plan" in bulgaria. See http://www.cis.gsu.edu/~dstraub/Courses/Grandma.htm


Further research is needed over why grandfathers don't have the same problem...

Wednesday, October 27, 2010

Callan Park - OUR plan, OUR say

This website is the worst example I have ever seen of 'push polling' - your options are only to 'support this plan' or do some minor tinkering with 'my options' questions which are specifically designed so you can't change the major parts of the plan.

As an academic, I find this planning/survey question process quite un-transparent and would violate/fail our ethics committee on the structure of the questions.

I would almost laugh at this attempt to push an opinion, except instead I am crying since I am a local resident.
How on earth did this so-called survey occurred? Who approved it?

Monday, September 20, 2010

TinEye Reverse Image Search

TinEye Reverse Image Search

Tried this out today - you can upload an image, or provide an image URL and it will detect (using image recognition) where else in the web is the picture. It's quite remarkable and works quite well. I'm using it to track where students are copying images and diagrams from, without acknowledgements..

Now only if turnitin does the same thing for essays/reports ...

Wednesday, September 08, 2010

Bug in Helios - J2EE Module dependencies KAPUT!

Those idiots in charge of Eclipse WTP have done it again.

Apparently they have removed the J2EE module dependencies feature in Eclipse 3.6 Helios WTP 3.2.0
What this means that if you have user libraries which your project will depend on (like.. say... JSTL or JDBC or something like that) normally under the old Galileo version you would:

1. Add a user library (or external jar or whatever) to the Java build path (Libraries -> Add External Jars).
2. Modify the J2EE Module Dependencies to export this (so it will get copied into the WEB-INF/lib directory or / depending on whether it's a WAR, JAR or EAR project)

Helios way:
They removed J2EE module dependencies, and now have a new feature called "Deployment Assembly" - which by itself looks interesting (directly map the source paths to deployment paths - this is goodness indeed). However, it forgets completely about the Java build path - ahem folks, how the F^*(^ do you mark the libraries to be exported to WEB-INF/lib ?? ooops... bbzzztt... epic fail.


Effectively, the missing libraries will appear due to the "Classpath dependency validator" which will indicate which libraries will be missing from the Webapp. You then select each miscreant and press QuickFix (Ctrl-1) to fix - ie: "Mark the associated raw classpath entry as a publish/export dependency"
(or the negative case: Exclude the associated raw classpath entry from the set of potential publish/export dependencies")

From what I gather, this is the ONLY way to do this until this bug is fixed.

The referenced bug may be fixed in Helios SR1: https://bugs.eclipse.org/bugs/show_bug.cgi?id=306462

Pain.

UPDATE: New way around this stupidity
Choose Deployment Assembly:
Click Add > Classpath Container > User Library > whatever
Now it will work. Geez!!


Wednesday, August 25, 2010

Android still sucks - still no WPA2 enterprise support!

Now I am running android 2.1, update 1, and still Google have not updated their fricking UI for WPA2 Enterprise.
Are they mad? Are they INSANE?
Even worse my wireless no longer works - their update overwrote my /etc/wifi/wpa_supplicant.conf with a dummy WRITE PROTECTED one so my old wifihelper app (and wifinder) can't write to it.

This means my Motorola Milestone does not work with most common university/corporate networks. My ipod touch seemlessly works. Android developers - I HATE YOU.

Oh, of course, I could ROOT my phone so I could update it myself (or use wifinder again). Pain in the (*^(*^(!

What is so embarrassing is that we teach android at this uni and our students can't connect to the network here - we use UTS-WPA (a WPA2 Enterprise network - simple set up,  just use WPA2 + AES for stage one, and EAP = PEAP for stage 2. Just use student/staff number and your email password)

For eduroam, you use EAP-TTLS, and use the PAP (nnnnn@uts.edu.au, password) instead.

SIMPLE EH?

Monday, August 02, 2010

Quality-oriented teaching of programming

Quality-oriented teaching of programming

Worth reading. I see this all the time too.
Why is there a double hump marks distribution with programming subjects?

This post is a good reason why.

mmm...

Tuesday, July 27, 2010

What is your personal organisation style?

Love this quote:
Schlenger and Roesch describe five distinct styles to organizing time:


 

  
  • The Hopper quickly and and frequently switches tasks throughout the day. Hoppers often enjoy variety and like to feel the gratification of completing small tasks, but they may be easily distracted by other people or technology. This is the most common of the temporal organizing styles.
  • The Perfectionist Plus seeks excellent performance in every activity, sets very high standards for herself and others, and may have difficulty distinguishing between valuable and less-valuable uses of her time.
  • The person who is Allergic to Detail enjoys thinking about the big picture and new ideas, sometimes neglecting smaller details or follow-through.
  • The Fence Sitter can see both sides of an issue and thoroughly researches upcoming decisions, both large and small, sometimes to the point of forestalling action.
  • The Cliff Hanger thrives on adrenaline, deadlines, and external pressure, but sometimes loses track of all the commitments he's juggling.
 
Schlenger and Roesch describe five styles of organizing physical space:


 

 
  • The Everything Out likes to have reminders, mementoes, and project materials in plain sight and within easy reach.
  • The Nothing Out prefers to have surfaces cleared off and materials stored away.
  • The Right Angler enjoys having things look a certain way, with the appearance of precision.
  • The Pack Rat keeps almost everything.
  •  The Total Slob believes that organizing things is a waste of time that could be spent on creative pursuits.

Chinese spam

Recently there have been a large number of chinese spamsters hitting my website with comments about their hackware websites (or some just plain strange ones). naturally these are blocked by me since I moderate every single comment.

But why do they pick on me, not the other ones I am aware of?

If you are a chinese blog-spamster,  F*** off!!

Blackboard aka UTS Online - how I hate thee

Our learning management system here at UTS is a pile of dog poo. It's so tedious to do anything and adds a lot of work to make life as an instructor painful.

There are so many websites and blogs  (google it)  bemoaning the pile of crap Blackboard inc. have written.

Sigh.

Tuesday, July 13, 2010

App Inventor for Android

App Inventor for Android

Oh dear, does this make us programmers redundant?

Apps for Android made easy - I now see a million iFart applications appearing...

Incidentally, It's amazing how your mind explores links - from this website I got to Kawa, then qexo (Xquery) which then leads back to HTML + JSP vs HTML generation via Xquery (http://www.gnu.org/software/qexo/XQ-Gen-XML.html) ...

Monday, June 14, 2010

Go Ahead: Next generation Java Programming Style

Code Monkeyism: Go Ahead: Next Generation Java Programming Style

here is a brief summary of style changes recommended:
Final is your new love
No setters
Do not use loops for list operations (hint: Use functional programming style)
Use one liners
Use many, many objects with many interfaces (ie: domain driven design)   
Use Erlang-Style Concurrency (huh?)
Use Fluent Interfaces (and Domain Specific Languages)
Data Transfer Objects without setters and getters (yeah, makes your code look simpler)

Sunday, May 30, 2010

Too Smart for good?


Being an academic, I find this article too close to the truth - I see the "honour roll" student and "gifted slacker" students in the same classes everyday.
Both need special motivation techniques. And I find them the greatest students to teach of all!!

What disturbs me is the "completely clueless" student who got in via "alternative" enrolment conditions. Most of these got into their enrolment WELL below the cut off marks.
Most universities offer "bonus" marks - some make sense (eg: 4 bonus HSC marks if you got high marks in Math for an engineering degree), but some of the marks are well ... pure charity...

Enterprise Software Development with Java: Spring and Google vs. Java EE 6


Quote:
Spring and everything around it is heading for the could. Literally with the speed of light. It only takes few weeks between new announcements around this topic. At the end of the day, Spring, VMWare and Google are providing a cloud based deployment platform for Spring based Java applications. That sounds modern, fast, easy and is potentially very interesting. It may provide the easiest, no-comprise way to publish Java applications. If you look at other cloud alternatives they are either more restrictive for the developers ("old" Google AppEngine) or provide services at an infrastructure level like Amazon's EC2. 

But: Spring and VMware are going to build their own Java universe where they dictate momentum, their 'standards' and more and more the commercial consequences as well. From an Enterprise Java point of view it's simpler. Too many things are called "Spring". And this makes it easy on the first look. You don't have to talk about 30 something specifications but about one big framework. And while Spring and Rod Johnson in particular have been extremely valuable in influencing the direction of Java (2)EE after the 1.4 release to the new, much more pragmatic world of Java EE 5, Spring has also caused polarization and fragmentation. Instead of helping forge the Java community together, it has sought to advanced its own cause. Which is perfectly valid - but should be recognized for what it is. Spring is not necessarily open, is not free, is not a community or even multi-vendor effort. Lock in with Spring is just another type of vendor-lockin. And that is, why it will never be a replacement for Java EE.
But there is another takeaway for the Java community and the owner of Java. The hype around innovative and integrated solutions is a proof for the Java EE universe moving too slowly along. Bring in more flexibility. Have more courage with changes. Find a way to adopt trends faster and support better modularity.

Monday, April 12, 2010

All Your Apps Are Belong to Apple: The iPhone Developer Program License Agreement | Electronic Frontier Foundation

UPDATED: All Your Apps Are Belong to Apple: The iPhone Developer Program License Agreement | Electronic Frontier Foundation

Oh boy. Apple have really made me angry. They are forcing this agreement down our throats.

Here is a partial quote:

The entire family of devices built on the iPhone OS (iPhone, iPod Touch, iPad) have been designed to run only software that is approved by Apple—a major shift from the norms of the personal computer market. Software developers who want Apple's approval must first agree to the iPhone Developer Program License Agreement.

So what's in the Agreement? Here are a few troubling highlights:

Ban on Public Statements: As mentioned above, Section 10.4 prohibits developers, including government agencies such as NASA, from making any "public statements" about the terms of the Agreement. This is particularly strange, since the Agreement itself is not "Apple Confidential Information" as defined in Section 10.1. So the terms are not confidential, but developers are contractually forbidden from speaking "publicly" about them.

App Store Only: Section 7.2 makes it clear that any applications developed using Apple's SDK may only be publicly distributed through the App Store, and that Apple can reject an app for any reason, even if it meets all the formal requirements disclosed by Apple. So if you use the SDK and your app is rejected by Apple, you're prohibited from distributing it through competing app stores like Cydia or Rock Your Phone.

Ban on Reverse Engineering: Section 2.6 prohibits any reverse engineering (including the kinds of reverse engineering for interoperability that courts have recognized as a fair use under copyright law), as well as anything that would "enable others" to reverse engineer, the SDK or iPhone OS.

No Tinkering with Any Apple Products: Section 3.2(e) is the "ban on jailbreaking" provision that received some attention when it was introduced last year. Surprisingly, however, it appears to prohibit developers from tinkering with any Apple software or technology, not just the iPhone, or "enabling others to do so." For example, this could mean that iPhone app developers are forbidden from making iPods interoperate with open source software, for example.

...

Kill Your App Any Time: Section 8 makes it clear that Apple can "revoke the digital certificate of any of Your Applications at any time." Steve Jobs has confirmed that Apple can remotely disable apps, even after they have been installed by users. This contract provision would appear to allow that.

We Never Owe You More than Fifty Bucks: Section 14 states that, no matter what, Apple will never be liable to any developer for more than $50 in damages. That's pretty remarkable, considering that Apple holds a developer's reputational and commercial value in its hands—it's not as though the developer can reach its existing customers anywhere else. So if Apple botches an update, accidentally kills your app, or leaks your entire customer list to a competitor, the Agreement tries to cap you at the cost of a nice dinner for one in Cupertino.

Overall, the Agreement is a very one-sided contract, favoring Apple at every turn. That's not unusual where end-user license agreements are concerned (and not all the terms may ultimately be enforceable), but it's a bit of a surprise as applied to the more than 100,000 developers for the iPhone, including many large public companies. How can Apple get away with it? Because it is the sole gateway to the more than 40 million iPhones that have been sold. In other words, it's only because Apple still "owns" the customer, long after each iPhone (and soon, iPad) is sold, that it is able to push these contractual terms on the entire universe of software developers for the platform.

In short, no competition among app stores means no competition for the license terms that apply to iPhone developers.

Thursday, April 01, 2010

Oracle purchases Apache foundation

The Apache Software Foundation Receives Approval for Sale to Oracle Corporation for $US1.5Billion.

Tsk tsk tsk.

Apparantly Oracle will change the Apache Software Licence (ASL) to the Apache Full and Open Oracle License (AFOOL) :-)

Wednesday, March 24, 2010

David Siegel discusses the Power of Pull; a different view of the Semantic Web? | The Semantic Web| ZDNet.com

David Siegel discusses the Power of Pull; a different view of the Semantic Web? | The Semantic Web| ZDNet.com

Siegel wrote books such as Futurize Your Enterprise and Creating Killer Websites (both impressive books, though at a view from 10000 feet).


In his new book "Pull: The Power of the Semantic Web to Transform Your Business" he suggests that using Semantic Web (though not just W3c technologies such as OWLS, RDF SPARCQL) can be the savior for web enabled businesses (and those who aren't :-)
What IS interesting is that Google are in an indirect way doing this - "PULLing" past information to make interesting deductions for the present. It's sometimes spooky how their data mining algorithms work - check the advertisements displayed from gmail.

Friday, March 19, 2010

motorola milestone - finally rooted

not in a bad sense, rather I managed to get my phone updated to Android 2.01
(since I have a british milestone from expansys.com.au, it gets its update from europe motorola via the internet),
Menu -> Settings -> System Updates ... & it runs for while....

When complete, you can now root.
Follow instructions from http://news.lehsys.com/?p=7537
1. download http://rapidshare.de/files/49019165/milestone_root.zip and rename to /sdcard/update.zip
2. switch off phone
3. hold camera button. Then power on.
4. When you get the triangle screen, release the power & camera button
5. Now tricky bit: Press Volume+ button & camera simultaneously. I had to attempt this about 10 times to get it to work
6. Now you get a list of options - Open the keyboard, use the navigation pad to select "Update from SD card."
7. Use the centre pad key to select - what ever you do, don't choose the "Format SD card" or "Hard Reset" options!!
8. You should see an updating screen - this may have an error message, but as long as you see the message "Rooting phone" (or similar :-), it has worked
9. Reboot the phone
10. Assuming it all booted up & you get your normal phone scree, start a Terminal emulator (I used ConnectBot or "Android Terminal Emulator (Jack Palevich)" from the Android Market, others use "Terminal Emulator"  but this gives me the dreaded Force Close message)
11. Type su  to get root access!!! ps: Android throws up a big screen "The following application has requested Superuser access to the phone". Select Yes.
ps: sometimes su hangs. I have to restart the terminal emulator to get it working again.

now for linux tools for android: http://android.modaco.com/content/htc-hero-hero-modaco-com/299984/linux-tools-coming-to-mcr/ & http://alldroid.org/threads/16201-HOW-TO-Root-Extras-Telus-Motorola-Milestone

Wednesday, March 10, 2010

Axis2: Why bother?

The BileBlog - Axis2: Why bother?

Bit harsh but very true - axis2 is not really a usable system. Sun's metro stack is way better. Just trying to get axis2's wsdl2java working resulted in me breaking a tooth in anger.

What get's my goat about Eclipse is it's linkages to Apache - the Web Tools Project webservices stuff deals only with Axis and it's ilk.
Oh yeah, there is a new Apache CXF interface which at least implements a marginally better product. But just check out the predic8 blog entry: http://www.predic8.com/axis2-cxf-jax-ws-comparison.htm
I'll quote it here for your reference:

WS-* Standards

The support of the WS-Standard family can also be decisive for the selection of a SOAP engine. For example, messages sent to services can be secured with signatures as described in the Web Service Security standard (in short WSS). Table 1 shows the support for WS*-Standards of the toolkits.
Standards Axis2 CXF JAX-WS/Metro
WS-Addressing X X X
WS-Coordination X(2)
X
WS-MetadataExchange

X
WS-Policy X X X
WS-ReliableMessaging X(3) X X
Web Services Security X(1) X(4) X
WS-SecureConversation X(1)
X
WS-SecurityPolicy

X
WS-Transaction X(2)
X
WS-Trust X
X
WS-Federation


Table 1: Support for WS-* Standards (stand: Juli 2008)
(1) Supported by the additional module Apache Rampart
(2) Supported by the additional module Apache Kandula2
(3) Supported by the additional module Apache Sandesha2
(4) By Apache WSS4J Interceptor
Who just wants to code against the standard is well advised with the JAX-WS implementation. The enterprise pack of the Netbeans development environment supports JAX-WS RI very well. Only a few clicks are needed to build a server or to call a Web Service

Another post is: http://www.arobs.com/innovationtech/tag/axis2-vs-cxf-vs-metro/ ps: this seems to be mostly a cut and paste from Thomas's blog... mmm ggrr.
And also: http://srikanthnukala.net/devblog/2009/06/29/axis2-vs-jax-ws-vs-apache-cxf-vc-spring-ws/

My problem is that Eclipse only supports the Apache products with the web services client generator.
Bugger them.

Tuesday, March 09, 2010

Oscars for former UTS students

From an internal email"

Congratulations to the following computer graphics students:

Glenn Sharah, who is credited on Avatar as a Shader Writer. Avatar won the
Academy Award for best visual effects.

Andre Mazzone, who is credited on Star Trek as a Research and Development
Programmer. Star Trek was nominated for best visual effects.

This is not the first time that these people have been up.

How many gadgets?


How many gadgets?
Originally uploaded by wongcr
How many mobile gadgets did these boys have?
Mark only had 2.
I had 2.
But I also have about another 4 hanging around in various places.
Sigh.

Thursday, February 25, 2010

How Plastic Bottles Are Poisoning Babies | newmatilda.com

Now I understand why Kathmandu are claiming their new water bottles are BPA free...

How Plastic Bottles Are Poisoning Babies | newmatilda.com

Thursday, February 18, 2010

Multivitamin Comparison - From Empty Air to Massively Boosting Health

Multivitamin Comparison - From Empty Air to Massively Boosting Health

Good Grief, it seems that Berocca Performance (3%) is just lolly water.

Of all things, Amway Nutriway is 27% and GNC Livewell is 26%.

Wednesday, February 17, 2010

"Epitaph on an Army of Mercenaries" by A.E. Housman

(ending track from the 1980 movie "The Dogs of War", sung by Gillian McPherson)


Epitaph on an Army of Mercenaries

These, in the day when heaven was falling,

The hour when earth's foundations fled,

Followed their mercenary calling,

And took their wages, and are dead.

Their shoulders held the sky suspended;

They stood, and earth's foundations stay;

What God abandoned, these defended,

And saved the sum of things for pay.

A.E. Housman


Tuesday, February 09, 2010

BRW tries to stop copying of it's content

BRW is using a new trick to stop the likes of google and traditional cut and paste:
Bots, bugs and bellyaches

They use stylesheets to mix up the letters! So if you look at the source code, you see junk:

Y u n w h t l a a e b u b i d n a e t r o s

instead of

You know that old adage about building a better mouse

In fact, the actual source code looks like this:
Y u  n w  h t  l  a a e  b u 
b i d n  a  e t r  o s  t a 
l a i g  o  h  i v n i n  f  
b t e  m u e?  t  a  a  w l 
h v  b e  w i t n  o  c m u e s
 n  c m u e  v r s s,  h c  b g n
 s  o u  p o r m i g  l t h s
 p e d  i  C  a d  a e  o p e 
a o g  i h  h  t c n l g  t  u e
 u t  b u  e e y  e n  i a i a l 
t  t a s i  t e s l e  f o 
u s s e t n  e d  s r  o  n u p c i g  n  u e .

Thursday, December 24, 2009

Monday, December 21, 2009

iphone/ipod touch location services

Well... it seems that Apple use Skyhook to do more accurate location based services than I expected.
I always thought the iPhone 3G simply used A-GPS and cell triangulation to determine your position - yet it was wildly accurate INSIDE my office....
turns out they use Wireless Location services - Skyhook have a massive database (using wardriving) of all the MAC addresses of wifi access points, and use this to determine your geographical location (in combination with GPS, A-GPS and cell triangulation),
heck, they even pay drivers to wardrive around the world.

Coverage is mostly densely urban europe, north america, australia and some asia (tokyo-osaka, HK, taipei, seoul, bangkok, beijing).

Monday, November 09, 2009

j2moose - how to reverse engineer j2ee

Saw this interesting research project:
Enabling the evolution of J2EE applications through reverse engineering and quality assurance


To quote:
To address the complexity of enterprise applications, J2EE offers a conglomerate of several technologies, (e.g. Enterprise Java Beans - EJB or Java Server Pages - JSP) using several languages, (e.g. Java, XML or SQL). In this context, simply applying existing reverse engineering and quality assurance techniques developed for object-oriented systems fails due to two major reasons:

analyzing only the Java source code overlooks the information written in other languages such as the XML configurations, the JSP files, the database structure or the SQL statements, and
even when analyzing the Java source code we need to consider the technology specific patterns (e.g. implementing specific interfaces).
This project aims to conduct a systematic study in reverse engineering and quality assurance of J2EE applications. In particular, we target the following questions each of them being addressed in a separate track:

How do we model J2EE to support analysis of the different languages?
What defines internal quality in J2EE applications and how do we measure it?
How do we visualize the diversity of languages to support understanding of J2EE applications?


Doc: http://scg.unibe.ch/archive/projects/Gurt06aJSP.pdf
Master: http://moose.unibe.ch/about
Description: http://scg.unibe.ch/research/hasler07

The implications for me: I want something to do automated marking for J2EE assignments. Basically a first pass would reverse engineer the submitted code, decide/visualise the model with certain matrices and then award a technical mark.
Humans (tutors) would then mark the assignment for completeness, correctness and qualitative measures such as "ease of use", "look and feel", "niceness" :-)

Friday, October 23, 2009

weblogic weirdness with @webservice @stateless beans

Weblogic 10.3 has a weird bug.
If you annotate a Stateless session bean, then add @WebService to it, it won't deploy and will give a strange message about xxxbean_xxx_WSOImpl.class not found.

Turns out that there is an SERVER side cache in your domain directory which confuses the EJB compiler and deploy tool
Remove the entire contents of $DOMAIN/servers/AdminServer/cache/EJBCompilerCache/*
(where $DOMAIN is your weblogic domain directory)


Oh, you also need to give your stateless bean a mappedName eg:
@Stateless(name="crapBean", mappedName="ejb/crapBean")

Friday, October 16, 2009

AMIS Technology blog � Blog Archive � EJB Dependency Injection of Session Bean Facade in JSF 1.2 on WebLogic 10.3 (JSF with JPA)

AMIS Technology blog � Blog Archive � EJB Dependency Injection of Session Bean Facade in JSF 1.2 on WebLogic 10.3 (JSF with JPA)

Also ork around for the issue of not being able to dependency inject Session Bean directly into JSF Managed Beans http://softquipeut.blogspot.com/2007/12/injection-dun-ejb-dans-un-back-bean-jsf.html

Tuesday, September 22, 2009

Monday, September 14, 2009

Monday, August 24, 2009

Programmer Competency Matrix

Programmer Competency Matrix | IndianGeek

A very true list of what programmers need have to be uber gurus.

Wednesday, July 22, 2009

Oracle workshop for weblogic 10g3 missing JPA

It seems that Oracle in it's wisdom deliberately removed JPA tools from Oracle Workshop for Weblogic 10g3.

The simple solution? Copy the feature from an existing Europa 3.3.2 WTP install.
For some reason, you can't use the eclipse update manager (Webtools update site) to download it - Oracle zapped the file I think? They only seem to offer the later Dali version, which of course doesn't work on the current europa based Workshop 10g3

The files to copy are:
  • features/org.eclipse.jpt.feature_1.0.2.v200802140100-77-7_CYQCD2CaLYCHCD
  • plugins/
    • org.eclipse.jpt.core_1.0.2.v200802140100.jar
    • org.eclipse.jpt.db.ui_1.0.0.v200705300001.jar
    • org.eclipse.jpt.db_1.0.2.v200802140100.jar
    • org.eclipse.jpt.doc.user_1.0.1.v200709120000.jar
    • org.eclipse.jpt.gen_1.0.2.v200802140100.jar
    • org.eclipse.jpt.ui_1.0.2.v200802140100.jar
    • org.eclipse.jpt.utility_1.0.2.v200802140100.jar

I actually made an eclipse extension directory for this, but really, this should be dumped into the bea/tools/eclipse_pkgs/2.0/eclipse_3.3.2/eclipse directory since this is really really the original eclipse europa. SILLY BEA/ORACLE!!!

You also need the Data Tools Project, get as a minimum 1.5.2 version: ie:

Update manager: Europa Discovery Site -> Database Development & -> Enabling Features -> Data Tools Platform JDT enablement

This downloads:

  • org.eclipse.datatools.connectivity.feature
  • org.eclipse.datatools.modelbase.feature
  • org.eclipse.datatools.sqldevtools.feature
  • org.eclipse.datatools.enablement.feature
  • org.eclipse.datatools.connectivity.db.generic.ui
  • org.eclipse.datatools.connectivity.db.generic
  • org.eclipse.datatools.doc.user

Then you can do New -> Project -> JPA project as usual.

See the tutorial at http://www.eclipse.org/webtools/dali
IMPORTANT NOTE: this is only Dali 1.0, so use the 1.0 tutorial at as an example tutorial



Saturday, July 18, 2009

Eclipse ganymede with Hibernate

Here is the KLUDGE way of doing hibernate with ganymede.
http://edemmorny.wordpress.com/2009/04/28/using-eclipse-dali-with-hibernate-as-persistence-provider/

In the past (actually very near past), you simply had a hibernate facet against your dynamic web project. You then loaded the libraries as needed.
Now you do stupid stuff like the old days, add stuff by hand.... this defeats the purpose of an IDE!!
I D I O T S.

Eclipse ganymede - more rants

Well it seems eclipse Ganymede Java EE version now discards many useful tools from Europa.
for example, you no longer have struts or hibernate facets in dynamic web projects.
This stupid decision is one for the dogs.
I also noticed that the default JPA providers are Eclipselink and Oracle (Bea) Kodo. Odd that both oracle projects got on the list but the #1 popular provider (Hibernate) didn't make it.

This is an example of political decisions at Eclipse making the product worse , not better, and more exclusive, not inclusive.

Here's another one - the default web service code is all based on Apache Axis. Now don't get me wrong, Axis is ok, but Axis2 is bloatware. So where is the Metro toolkit here? Ahah, nope, Apache (Sanjeva/Dave) koolaid at work here ("let's make axis more popular by excluding the web services stack used by glassfish, weblogic etc").

Oh, you mean IBM is part of the eclipse council? mmmm, no co-incidence that Axis is part of the IBM stacks now ... ??

Eclipse Ganymede update sux

It turns out that Eclipse 3.4 ganymede turns of the "classic" update by default in anything except bare bones Eclipse.
You don't even have the GUI option of turning it off.

Well this web site (http://hamandeggs.wordpress.com/2009/01/20/eclipse-34-ganymede-and-classic-update/ ) shows you how to turn it back on!!

YAY!. P2 Sux.

Tuesday, June 30, 2009

10 dying IT skills | 10 Things | TechRepublic.com

10 dying IT skills | 10 Things | TechRepublic.com
To quote the article:

There are some things in life, like good manners, that never go out of style. And there are other things, like clothing styles, that fall in and out of fashion. But when an IT skill falls out of favor, it rarely ever comes back. Here’s our list of 10 dying IT skills. If any of these skills is your main expertise, perhaps it’s time to think about updating your skill set.

Note: This article is based on a Global Knowledge white paper by Linda Leung.

1: Asynchronous Transfer Mode

ATM was popular in the late 90s, particularly among carriers, as the answer to overworked frame relay for wide-area networking. It was considered more scalable than frame relay and offered inherent QoS support. It was also marketed as a LAN platform, but that was its weakness. According to Wikipedia, ATM failed to gain wide acceptance in the LAN where IP makes more sense for unifying voice and data on the network. Wikipedia notes that ATM will continue to be deployed by carriers that have committed to existing ATM deployments, but the technology is increasingly challenged by speed and traffic shaping requirements of converged voice and data networks. A growing number of carriers are now using Multi-Protocol Label Switching (MPLS), which integrates the label-switching capabilities of ATM with the packet orientation of IP. IT skills researcher Foote Partners listed ATM in its IT Skills and Certification Pay Index as a non-certified IT skill that has decreased in value in the last six month of 2008.

2: Novell NetWare

Novell’s network operating system was the de facto standard for LANs in the 1990s, running on more than 70% of enterprise networks. But Novell failed to compete with the marketing might of Microsoft. Novell tried to put up a good fight by acquiring WordPerfect to compete with Windows Office, but that move failed to ignite the market, and Novell eventually sold WordPerfect to Corel in 1996. Novell certifications, such as Certified Novell Engineer, Master Certified Novell Engineer, Certified Novell Certified Directory Engineer, and Novell Administrator, were once hot in the industry. But now, they are featured in Foote Partners’ list of skills that decreased in value in 2008. Hiring managers want Windows Server and Linux skills instead.

3: Visual J++

Skills pay for Microsoft’s version of Java declined 37.5% last year, according to the Foote Partners’ study. The life of J++, which is available with Microsoft Visual Studio 6.0, was not a smooth one. Although Sun Microsystems licensed Java to Microsoft to develop J++, Microsoft failed to implement some features of the official Java standard while implementing other extensions of its own. Sun sued Microsoft for licensing violations in a legal wrangle that lasted three years. Microsoft eventually replaced J++ with Microsoft .NET.

4: Wireless Application Protocol

Yes, people were able to browse the Internet in the late 90s before Apple’s iPhone. Web site operators would rewrite their content to the WAP’s Wireless Markup Language, enabling users to access Web services such as email, stock results and news headlines using their cell phones and PDAs. WAP was not well received at the beginning because WAP sites were slow and lacked the richness of the Web. WAP has also seen different levels of uptake worldwide because of the different wireless regulations and standards around the world. WAP has since evolved and is a feature of Multimedia Messaging Service, but there is now a new generation of competing mobile Web browsers, including Opera Mobile and the iPhone’s Safari browser.

5: ColdFusion

ColdFusion users rave that this Web programming language is easy to use and quick to jump into, but as many other independent software tools have experienced, it’s hard to compete with products backed by expensive marketing campaigns from Microsoft and others. The language was originally released in 1995 by Allaire, which was acquired by Macromedia (which itself was purchased by Adobe). Today, it is superseded by Microsoft .NET, Java, PHP, and the language of the moment: open source Ruby on Rails. A quick search of the Indeed.com job aggregator site returned 11,045 jobs seeking PHP skills, compared to 2,027 CF jobs. Even Ruby on Rails, which is a much newer technology - and which received a major boost when Apple packaged it with OS X v10.5 in 2007 — returned 1,550 jobs openings on Indeed.com.

6: RAD/extreme programming

Back in the late 90s and early 2000s, the rapid application development and extreme programming development philosophies resulted in quicker and more flexible programming that embraced the ever-changing needs of customers during the development process. In XP, developers adapted to changing requirements at any point during the project life rather than attempting to define all requirements at the beginning. In RAD, developers embraced interactive use of structured techniques and prototyping to define users’ requirements. The result was accelerated software development. Although the skills were consistently the highest paying in Foote Partners survey since 1999, they began to lose ground in 2003 due to the proliferation of offshore outsourcing of applica­tions development.

7: Siebel

Siebel is one skill that makes a recurring appearance in the Foote Partners’ list of skills that have lost their luster. Siebel was synonymous with customer relationship management in the late 90s and early 2000s, and the company dominated the market with a 45% share in 2002. Founded by Thomas Siebel, a former Oracle executive with no love lost for his past employer, Siebel competed aggressively with Oracle until 2006 when it was ultimately acquired by the database giant. Siebel’s complex and expensive CRM software required experts to install and manage. That model lost out to the new breed of software-as-a-service (SaaS) packages from companies such as Salesforce.com, which deliver comparable software over the Web. According to the ITJobsWatch.com, Siebel experts command an average salary of GBP52,684 ($78,564), but that’s a slide from GBP55,122 a year ago. Siebel is ranked 319 in the job research site’s list of jobs in demand, compared to 310 in 2008.

8: SNA

The introduction of IP and other Internet networking technologies into enterprises in the 1990s signaled the demise of IBM’s proprietary Systems Network Architecture. According to Wikipedia, the protocol is still used extensively in banks and other financial transaction networks and so SNA skills continue to appear in job ads. But permanent positions seeking SNA skills are few and far between. ITJobsWatch.com noted that there were three opening for permanent jobs between February and April, compared to 43 during the same period last year. Meanwhile, companies such as HP offer consultants with experience in SNA and other legacy skills, such as OpenVMS and Tru64 UNIX for short-term assignments.

9: HTML

We’re not suggesting the Internet is dead, but with the proliferation of easy-to-use WYSIWYG HTML editors enabling non-techies to set up blogs and Web pages, Web site development is no longer a black art. Sure, there’s still a need for professional Web developers, but a good grasp of HTML isn’t the only skill required of a Web developer. Professional developers often have expertise in Java, AJAX, C++, and .NET, among other programming languages. HTML as a skill lost more than 40% of its value between 2001 and 2003, according to Foote Partners.

10: COBOL

Is it dead or alive? This 40-year-old programming language often appears in lists of dying IT skills. But it also appears in as many articles about organizations with legacy applications written in COBOL that are having a hard time finding workers with COBOL skills. IBM cites statistics that 70% of the world’s business data is still being processed by COBOL applications. But how many of these applications will remain in COBOL for the long term? Even IBM is pushing its customers to “build bridges” and use service-oriented architecture to “transform legacy applications and make them part of a fast and flexible IT architecture.”



Wednesday, June 17, 2009

A developer's perspective on Google's Android SDK

A developer's perspective on Google's Android SDK

Android sucks

It seems that android (even the 1.5) version doesn't support WPA-enterprise (nor WPA2-enterprise).

or.. at least the UI.
(see http://code.google.com/p/android/issues/detail?id=1386)

But good news - since this is based on Linux, and linux supports WPA-enterprise, an enterprising (sic.) student at Purdue, Fan Zhang, has built an android app to edit the wifi supplicant code in the linux kernel to allow you to edit the supplicant configuration file!
http://forum.xda-developers.com/showthread.php?p=3765595

You can download the app from the Android Marketplace, or from here:
http://web.ics.purdue.edu/%7Ezhang42/wifiHelper.apk

The source is here: wifihelper - Google Code


Monday, June 15, 2009

How-To: Use iPhone as USB Mass Storage & File Viewer - MacTalk Forums

How-To: Use iPhone as USB Mass Storage & File Viewer - MacTalk Forums

Actually you only need to load the Discover app on the iphone. 
It then runs as a web server at http://x.x.x.x:8888 so you point your pc browser at this address then upload.
The app is supported by adware. Quite annoying. But heck it is free.
The fileview is excellent. Supports pdf and xls/doc files (readonly)


Friday, June 05, 2009

Running J2ME on Android

Now that I have my new Android Developer Phone 1 (aka, HTC Dream or T-mobile G1), I'm investigating how to develop apps on it

There is a complete new toolkit (Android SDK) and Eclipse Plugin (which includes the emulator). And a tonne of new APIs to learn (growl)

But what about J2ME? It's not natively supported on the Android platform.

Lucky for us, there are 2 "emulators" / Bridges for it.

(1) Assembla J2ME Android Bridge: This is a set of bridging libraries - just port your code to the Android eclipse  platform, plug these libraries (which emulate javax.microedition.*) and away you go. Although only tested on  1.0r2 and I just upgraded to Android 1.5.. ggrr

(2) Run an emulator on Android. Not the fastest thing to do. Try http://www.netmite.com/android/ aka the MIDP runner. Hey, this supports the Bluetooth API too!! Great.

(3) My preferred alternative is to use J2ME Polish. This development platform is great - you write to their libraries, and then choose the device to build against. The beauty of this is that you can choose other targets too like Nokia, Blackberry, Android, generic J2ME devices etc. And you use CSS styles to decorate your application. And includes HTML/RSS browser widgets in addition to the usual microedition.lcdui stuff.
Also apparantly it has a Windows Mobile, iphone and Palm target for builds. Assuming you have the relevant toolkits installed of course :-)

Monday, May 18, 2009

The Five Essential Phone-Screen Questions

Stevey's Home Page - The Five Essential Phone-Screen Questions�

Without further ado, here they are: The Five Essential Questions for the first phone-screen with an SDE candidate:

1) Coding. The candidate has to write some simple code, with correct syntax, in C, C++, or Java.
2) OO design. The candidate has to define basic OO concepts, and come up with classes to model a simple problem.
3) Scripting and regexes. The candidate has to describe how to find the phone numbers in 50,000 HTML pages.
4) Data structures. The candidate has to demonstrate basic knowledge of the most common data structures.
5) Bits and bytes. The candidate has to answer simple questions about bits, bytes, and binary numbers.

The FizzBuzz test & programmers ... or not

Coding Horror: Why Can't Programmers.. Program?

Simple test for programming skills:
Write a program that prints the numbers from 1 to 100.
But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz".
For numbers which are multiples of both three and five print "FizzBuzz".


See also:

Separating Programming Sheep from Non-Programming Goats

it seems fundamental skills are not being understood:


See also :http://www.cs.mdx.ac.uk/research/PhDArea/saeed/

All teachers of programming find that their results display a 'double hump'. It is as if there are two populations: those who can, and those who cannot, each with its own independent bell curve. Almost all research into programming teaching and learning have concentrated on teaching: change the language, change the application area, use an IDE and work on motivation. None of it works, and the double hump persists. We have a test which picks out the population that can program, before the course begins. We can pick apart the double hump. You probably don't believe this, but you will after you hear the talk. We don't know exactly how/why it works, but we have some good theories.

So true. I see this in all my programming subjects!!!

Wednesday, April 29, 2009

Improve your XSLT coding five ways

Improve your XSLT coding five ways

Top hints are:

Tip 1: Cascading style sheets, tables, and XSLT

Tip 2: HTML entities

[ incidentally, to use non-breaking spaces, use #&160; ]

Tip 3: Multiple input documents

Tip 4: XSLT and client-side JavaScript

Tip 5: Automating style sheet creation


Friday, April 24, 2009

Star Trek XI trailer music

Nice trailer music for the next stat trek movie.

http://www.imeem.com/people/hhz_iA/music/2KihKMOL/two-steps-from-hell-freedom-
fighters/#

Thursday, April 23, 2009

Oracle Take a REST on JAX-WS with WebLogic Server 10.3

You can also do a similar trick using metro (which incidentally is what is actually installed on weblogic 10.3 under the covers :-)
Dunno if you can try it via java se6 built in httpserver (endpoint). Might try it out.

Wednesday, April 15, 2009

GNS3 - a Cisco network simulator

Woot! A colleague at work suggested the following for practicing your Cisco certifications
Graphical Network Simulator 3

This basically simulates the common hardware used by the following CISCO routers:

Cisco 3600 series (3620, 3640 and 3660), 3700 series (3725, 3745) and 2600 series (2610 to 2650XM, 2691).


The core module is the Dynamips project (http://www.ipflow.utc.fr/index.php/Cisco_7200_Simulator)

XML appliances and SOA

Christian Bernard's research on current XML appliances.


Translated version of http://ws-express.blogspot.com/2008/10/solutions-appliances-xml-et-soa.html


Note this list is a mix of Application and Security vendors:

Current players:

Layer 7
IBM Websphere Datapower (ex-Datapower)
Intel SOA (ex-Sarvega)
Forum Systems
Cisco ACE (ex-Reactivity)
Cisco AON
Vordel
Cast Iron
F5 BIG-IP
Radware
Dajeil
Xtradyne
Acatel-Lucent Omniaccess
Meddius
Stampede
Strangeloop
Sonoa
Solace
Safenet
Azul
Bee ware

Original list:

Dawn of the App Aware Network

Part of my research is looking at moving apps from the core of the network to the edge (or network aware devices).

Web services (and XML-RPC and REST) and Enterprise Service Bus fit this model quite nicely.

XML accelerator Devices such as Cisco AON or Cisco ACE (ex-Reactivity) or IBM Datapower can be used to replace the Web services routing function required by modern distributed applications into the network.


The implication?


This changes the model of application development from a software-architecture centric viewpoint into a services oriented architecture.

And the commoditisation of this will drive costs down for enterprises and will harm revenue for middleware vendors.

The edge is here.
Why not go a step further? How about pushing application processing to the edge of the network?
In my Faculty [Engineering and IT]/School of Computing and Communications, we are developing Mobile Health applications using 'motes' - tiny devices running a pico-net (and a mutant version of Java)

Tuesday, April 14, 2009

Testing post by windows live writer

this is a test of windows live writer.

I used to use w.bloggar, but it now fails on blogger.

Ditto with Post2Blog

The issue with free code is that is rarely is updated when the underlying API’s change.

 

Curse you blogger!

Monday, April 13, 2009

Calling RPC/encoded web services from JAX-WS clients

Glen Mazza's Weblog

Returning PDFs from Web Services using MTOM and Apache FOP

Glen Mazza's Weblog

JAX-RS as the one Java web framework to rule them all?

James Strachan's Blog: JAX-RS as the one Java web framework to rule them all?

Paul Fremantle's Blog: Three SOA Case Studies

Paul Fremantle's Blog: Three SOA Case Studies

emerging technologies conference in philadelphia

Glenn Mazza: emerging technologies conference in philadelphia

Don’t Invent XML Languages

Don’t Invent XML Languages
Tim Bray in 06 suggested that you shouldn't reinvent any XMl language, unless you can prove it doesn't fit the "BIG 5":
The Big Five
Suppose you’ve got an application where a markup language would be handy, and you’re wisely resisting the temptation to build your own. What are you going to do, then? ¶

The smartest thing to do would be to find a way to use one of the perfectly good markup languages that have been designed and debugged and have validators and authoring software and parsers and generators and all that other good stuff. Here’s a radical idea: don’t even think of making your own language until you’re sure that you can’t do the job using one of the Big Five: XHTML, DocBook, ODF, UBL, and Atom.

XHTML + Microformats:
If you’re delivering information to humans over the Web, even if you don’t think of it as “Web Pages”, it’s almost certainly insane not to use XHTML. Yes, XHTML is semantically weak and doesn’t really grok hierarchy and has a bunch of other problems. That’s OK, because it has a general-purpose class attribute and ignores markup it doesn’t know about and you can bastardize it eight ways from center without anything breaking. The Kool Kids call this “Microformats” and in fact I accidentally invented one on ongoing last November; look at that template and its class attributes. ¶

And of course, if you use XHTML you can feed it to the browsers that are already there on a few hundred million desktops and humans can read it, and if they want to know how to do what it’s doing, they can “View Source”—these are powerful arguments.

DocBook
Suppose you’re building something that needs to go bigger and deeper and richer than XHTML is comfy with, and you want to repurpose it for print and electronic and voice, and you need chapters and sections and appendices and bibliographies and footnotes and so on. DocBook is what you need. It’s got everything you could possibly begin to imagine already built-in, and there are lots of good tools out there to do useful things with it. ¶

ODF
Suppose you’re working with material that’s going to have a lot of workflow around it, and be complex, visually if not structurally, and maybe some day will be printed out and have signatures at the bottom. ODF is what you want. Not the most Web-oriented approach, but on the other hand the authoring tools are more human-friendly than anything else on this list. ¶

UBL
If you’re working with invoices and purchase orders and that kind of stuff (and who isn’t?), do not even think of inventing anything. A whole bunch of smart people have put hundreds of person-years into pulling together the basics, and they did a good job, and it’s ready to go today. Look no further. ¶

Atom
Suppose you think of your data as a list of, well, anything: stock prices or workflow steps or cake ingredients or sports statistics. Atom might be for you. Suppose the things in the list ought to have human-readable labels and have to carry a timestamp and might be re-aggregated into other lists. Atom is almost certainly what you need. And for a data format that didn’t exist a year ago, there’s a whole great big butt-load of software that understands it. ¶

Wednesday, April 01, 2009

weirdness with java 6 JAX-WS

strange error occuring with Jax-ws on Java JDK 1.6.0_06 or lower. after building the stubs with wsimport and writing a trivial client, you get javax.xml.ws.WebServiceException: unexpected XML reader state. expected: END_ELEMENT but found: START_ELEMENT when running against a document/literal web service However, upon upgrading to JDK 1.6.0_07 (or higher) it now works? seems there was a bugfix in 07 update

Tomcat security

One painful thing I'm learning is the restrictions tomcat has when running under the -security option.Basically many things (eg: jaxb, jax-ws, axis) can't run.
Locating the appropriate permissions is pretty daunting.Now lhttp://www.onjava.com/pub/a/onjava/2007/01/03/discovering-java-security-requirements.html has a tool calledProfilingSecurityManager (which is just a custom SecurityManager class) which displays the permissions required(basically start catalina with -Djava.security.manager=secmgr.ProfingSecurityManager)You then use a perl script
Another reference is http://www.petrovic.org/blog/2006/05/07/tomcat-security-option-and-catalinapolicy-file
Basically export CATALINA_OPTS=-Djava.security.debug=access,failurethen run catalina.sh run -security
Look in catalina.out for denied.Then seek for "domain that failed ProtectionDomain" for the codebase or domain.
http://www.jchains.org/ also allows you to do the same for standard java execution.

Tuesday, March 31, 2009

Java Logging API and How To Use It

Java Logging API and How To Use It

On tomcat 5.5 we have the JULI library which replaces the standard java logger.
So to get per-context logging, put
logging.properties into WEB-INF/classes with the following contents:
handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler

############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################

org.apache.juli.FileHandler.level = FINE
org.apache.juli.FileHandler.directory = ${catalina.base}/logs
org.apache.juli.FileHandler.prefix = myapp-prefix.

java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

ps: here are the standard set of JULI properties:
  • org.apache.juli.FileHandler.directory
  • org.apache.juli.FileHandler.prefix
  • org.apache.juli.FileHandler.suffix
  • org.apache.juli.FileHandler.level
  • org.apache.juli.FileHandler.filter
  • org.apache.juli.FileHandler.formatter

Tuesday, March 24, 2009

Disabling Certificate Validation in an HTTPS Connection (Java Developers Almanac Example)

Whilst suffering extreme pain due to self-signed certificates (hint: UTS IT ?) here is a nify trick to roll your own non certificate checking class:
Disabling Certificate Validation in an HTTPS Connection (Java Developers Almanac Example E502)

e502. Disabling Certificate Validation in an HTTPS Connection
By default, accessing an HTTPS URL using the URL class results in an exception if the server's certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all certificates.
exception if the server's certificate chain cannot be validated has not previously been installed in the truststore. If you want to disable the validation of certificates for testing purposes, you need to override the default trust manager with one that trusts all certificates.

// Create a trust manager that does not validate certificate chains
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
}
}
};

// Install the all-trusting trust manager
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
} catch (Exception e) {
}
   


Client:

// Now you can access an https URL without having the certificate in the truststore
try {
URL url = new URL("https://hostname/index.html");
} catch (MalformedURLException e) {
}

Friday, March 20, 2009

Critical Steps to Secure Tomcat on Windows NT/2K/XP

Critical Steps to Secure Tomcat on Windows NT/2K/XP

wow, running tomcat can really cause security holes.
fancy
Runtime rt = Runtime.getRuntime();
rt.exec("c:\\SomeDirectory\\SomeUnsafeProgram.exe")

running under the system context (As Administrator!!) of windows.

boo yaa!

Wednesday, March 18, 2009

this is a blog post using w.bloggar http://wbloggar.com/download.php

A quick way of entering blog entries.

chris