Showing posts with label google. Show all posts
Showing posts with label google. Show all posts

Tuesday, October 19, 2010

DevReach 18+19 October Sofia, Bulgaria (part6)

...continued

HTML 5 crash course


HTML 5 is connected with everything that is modern and flashy today. 
Introduction of iPad is in the same day as the HTML5 introduction.
Adobe vs Apple conflict.

"Apple is becoming the most important company in the US"

www.html5rocks.com - some tricks, a site recommended.

Browser vendors love HTML 5 because they don't want their products to be 'old'.
HTML 5 is pushed into the history.

HTML5 is not ready yet. It's good

The sad facts:

60% of Internet is used with IE6, IE5 and IE7 - they don't support HTML5.
60% Windows XP
15% still use IE 6.
91% of the browser users use Windows - they have the grip

Silverlight updates are quicker - they are pushed with automatic updates with Windows.

In his oppinion "Html 5 > 4"

www.html5test.com - test the browser about html5 support
Chrome - 217 + 10 bonus
IE8 - 27 + 0 bonus
Opera 10.61 - 159 + 7 bonus

Microsoft will never get 100% for ACID3 test because they don't want to support SVG fonts.

Syntax:
HTML5 template is with a DTD... nobody validates it with a DTD. "A pain in the ass" - quote.
AJAX was never specified.... they reverse-engineered it.
HTML5 has a spec - that makes it a lot different. The error behaviour consistent.

He simplified the HTML5... - charset, language, DTD validation - cleaner.

New semantic tags:
Old way - meaningless IDs for "div" tag
Google statistics : code.google.com/webstats about names of ID
They took the statistics and used the mostly used words and make them special words. They made the best practices rules in HTML5.

WebMatrix - interesting free tool for building web sites. Part of the WebPlatform. It's a direct competitor to PHP.
Razor + MVC  --- "in a 6 months will be the hottest thing"

"Microsoft's primary goals this year - Azure, IE9 and HTML5"

Modernizer - javascript lib for audio
html5shim .code.google.com -- javascript for adding HTML5 tags to IE6 (which doesn't support it)

html5 - audio tag
html5boilerplate - best add-on pack for html5

"Silverlight version of video is adaptive to the broadband width"

Google created a site to refer to for fonts instead of distribute them in your own site as a local copy.

L.K. 

Thursday, October 07, 2010

Java2Days Sofia Day 1 (part 6)

17:00 - 6. Google App Engine for Java Ice Penov

GAE = Google App Engine
Google Eclipse Plug-in - comfortable for developing in Java.

GAE lets you run and maintain your web applications
GAE supports Java and Python

An application will become available on *.appspot.com

Benefits and advantages of GAE:
- cloud
- free resources
- Google infrastructure for scalability
- easy integration with Google accounts and other services

(demonstrates how to create a GAE application)

GWT = Google Web Toolkit (made for JavaScript and AJAX)

GWT compiles Java to JavaScript => slower compile . That is done because it's executed in a browser.

Quote:
"OK. I'm speaking with the Google cloud... I should socialize more" - after creating a Google application that sends messages via Google Talk and you can return your parameters to your application as you respond via Google Talk as well. :)

GAE is in sandbox.
- cannot write to file system
- cannot open socket to another host
- cannot open a thread
- cannot make explicit System calls like System.exit()

There is a white-list of JRE features supported by the GAE cloud. (easily googleable)
- he thinks that this is a major drawback, because you can't make your application run on your server and then associate it with the cloud.

There are some metrics services on the GAE - CPU time, request-count etc...

Out-of-the-box Services API:

- storing data is done with Google BigTable which is a NoSQL
   JDO preferred to JPA; GQL is available - no real info given for this
 ------- cannot use JOIN query and aggregation queries

-  MemCache Java API - distributed in-memory data cache
      JCache API can be used

- Mail Service - Java Mail API can be used
- XMPP - Google Talk uses this IM protocol
- Image service - resize, rotate, flip, crop
- Google Account - you can integrate openID into your GAE application

GAE and other technologies interoperabilities:
- JEE - not supported JDBC, RMI,
- other JVM languages - supported

-3rd party
--- supported - Spring, Tiles, Struts, GWT
--- not supported - Hibernate, iText, Rich(ICE)Faces



And that's it for today!
Java2Days first day is over. I hope you find these notes interesting. I wrote them as I was attending the sessions so my posts could lack enough sentences but you will forgive me :)

Unfortunately, I cannot cover Java2Days Day 2 and  share my thoughts.

Leni Kirilov

Monday, May 24, 2010

JDK 1.6 installation problems

Today's topic is Java Developers' Kit.

I've had a peculiar problem with JDKs.  I wanted to install the latest version of JDK 1.6 update 18 at the time, but I also wanted to have JDK 1.5 so that I test my application with different compilers and runtime environments.

However there was some sort of problem with it (the source of it, I am unaware till this day) that caused my Windows  unable to detect my successful installation. I checked that on this special site java.com

I could also check it with an applet in a page - it said that I need to install java...

1. First idea - reinstall
I thought that my register was messed-up and ran CCleaner to clean it. That didn't help.

I decided to reinstall it and here's my first surprise:
After the successful uninstall and running CCleaner again (just to be sure), and decided to reinstall the JDK
I've got a very "funny" error message (something like this - I don't remember the correct caption):

"Installer has detected that you have JDK installed. Do you want to repair/reinstall it?"
If you click NO - the installer shuts down.
If you click YES - the following message appears:

"You don't have JDK installed on your machine!"

Holly shit ! Isn't that just a bit contradicting...

Obviously, the algorithm at the beginning isn't the same as the one at the end...

2. Second idea - install older version
OK. I cannot override this incorrect installation. So let's try to downgrade it a bit.
I decided to try JDK 1.6 update 17. When I run it it said:

"You have already installed a higher version of JDK" - installation finished!

Thank you very much, smart installer!

3. Third idea - ask Google
"OK stop trying to be a smart ass. There has to be somebody with the same problem that has a solution!" 
 was my thought.
Yeah, right... After many hours of searching and "smart solutions", none of them helped me.
I intend not to list them here... just too many and very customized...

One of them seemed promising to me.
Google helped me find a tool and step-by-step solution.

4. Forth idea - clean up registry 
I absolutely had no other choice than to try and clean my registry.

Including backing up my registry and using a free tool called "JavaRA"  that could help me maintain my system and Java versions and updates very well... well I tried it and it didn't help... I was very disappointed but maybe my expectations were just too great.


5. No idea - desperation
I was quite desperate that my JDK ws not correctly installed. My applets weren't working. Eclipse stopped working at a certain moment. NetBeans - too. I even had to use system restore... a total disaster.

And I just migrated to Windows 7 Pro 64bit version... which seemed nice for user but apparently not for JAVA users... Using Win XP I didn't have such problems (although I think I had a similar problem a few years ago).
...
but I had a workaround!!

6. The workaround  - JDK 1.7 unofficial!
Well, I was lucky I accidentally installed JDK1.7 which is still unofficial and doesn't overwrite the latest JDK 1.6. So when I installed and played around with PATH and JAVA_HOME variables and Eclipse and NetBeans configurations, I was able to continue with my Java project development.
But I was still unsatisfied, because this is just a workaround !

A developer must never be satisfied with a mere workaround!

Tuesday, May 18, 2010

Laptop battery preservation tips

I've made some research regarding laptop Lithium-Ion batteries, because I was concerned, that if I don't use it properly, I might damage the battery of my brand new laptop

I've find a few nice resources with plenty of explanation in the Internet but nobody said his/her suggestion was the true thing. So I decided to try a few strategies myself out.

Here's my story and make your own conclusions out of it:

----
I bought a Dell Inspiron 1520 back in 2008 September. It has a 9-cell battery Lithium-Ion.

It was said to be possible to work for 3 hours with normal usage on "power management settings" and I have tried it and it proved to be true. And I wanted to keep it this way for as long as possible.

I mainly use my laptop as a "desktop laptop" and it's constantly plugged to the AC adapter.
  • The idea was to discharge the battery to 30-50% and put it in a cold place (refrigerator) - this way it is supposed to be best preserved for a long time.
I decided to remove the battery and stick with purely AC power, but after a few accidental power cable plug-out ... I decided it's not such a good idea. The UPS feature is essential! 


The next idea proved to be more successful. I've put reminders every 2 weeks to use my laptop on battery only and drop it just under 50% of charge. This is somewhat of an exercise for the battery and it doesn't "forget" how to charge/decharge.
  • I put 2 week reminders in Google Calendar to use laptop on battery only till 50% battery capacity.

CONCLUSION:
I have used this technique for the last 24 months. I'm using these days the laptop more on battery only and it survives more than 2:30 hours. That is with slightly dimmed screen and power settings ON, Windows 7 and wireless put on. I'm using it as if it's on AC power.

So I think this little technique has helped me.
Comparison with a friend of mine using a Sony laptop only on AC power and now he says it manages to keep it on battery for about an hour. What a difference!


Piece of advice:
This strategy helped me, but can be harmful for your laptop and/or battery ! Do this on your own risk!
(I'm obliged to write this... )

L.K.