Rough Book

random musings of just another computer nerd

Tag: sun

#sunrise at #keflavik, #iceland. Took this as we were flying out of Keflavik, our first stop on our way back from Baghdad. I wish I had more shots of the landscape. Quite unearthly and beautiful. 
#sunshine #sunrise #sunrays #sun #amateurphotography #amateurphotographer #photography #photographer #landscape #landscapephotography #scenery #nature  #goldensky
#sunrise at #keflavik, #iceland. Took this as we were flying out of Keflavik, our first stop on our way back from Baghdad. I wish I had more shots of the landscape. Quite unearthly and beautiful. #sunshine #sunrise #sunrays #sun #amateurphotography #amateurphotographer #photography #photographer #landscape #landscapephotography #scenery #nature #goldensky
#sunset at #campliberty. Definitely spectacular due to the tons of garbage we were burning in the dumps. -_-. Took this on my old Sony point and shoot. 
#photography #amateurphotography #photographer #amateurphotographer #naturephotography #nature #scenery #sun #skyonfire
#sunset at #campliberty. Definitely spectacular due to the tons of garbage we were burning in the dumps. -_-. Took this on my old Sony point and shoot. #photography #amateurphotography #photographer #amateurphotographer #naturephotography #nature #scenery #sun #skyonfire
Somewhere by Hortons Creek in Payson, AZ. #hortonscreek #hortonscreektrail #az #photography #photographer #amateurphotographer #amateurphotographer #naturephotography #nature #sun #sunrays #forest
Somewhere by Hortons Creek in Payson, AZ. #hortonscreek #hortonscreektrail #az #photography #photographer #amateurphotographer #amateurphotographer #naturephotography #nature #sun #sunrays #forest

The Sun’s not going to blow up

In any science fiction story I’ve read (or science fiction movie or TV show that I’ve seen) that talks about death of the Sun. I’ve always heard references to Earth’s sun “going nova”. I’ve read about this even in Asimov’s stories. In most cases, they’re talking about a supernova. But here’s the thing. The Sun is not going to blow up. Even if the writers were talking about an actual nova, they’re still wrong. Here’s why:

Our Sun is a yellow dwarf star (more precisely known as a G-type main-sequence star), and doesn’t have enough mass to undergo a supernova explosion (type IIa). You need a star that’s at least nine times the Sun’s mass for a supernova explosion. If we’re simply looking at a nova (type Ia), then the Sun doesn’t have a companion to draw matter from when it turns into a white dwarf. So no matter which way you look at it, the Sun is not going to blow up. It’s just going to be really, big and red and will eat the Earth. Unless the Earth moves outward due to the Sun losing mass. Finally the Sun with eject its outer layers and turn into a white dwarf. See? No blowing up. I don’t know why some science fiction authors still talk about the Sun “going nova”. Maybe it’s because it sounds more dramatic.

If anyone has read a science fiction story (or seen a science fiction movie or TV show) that talked about the death of the Sun/Earth and did so realistically, then let me know.

JavaFX: The New Hotness

I went to JavaOne a few months ago. It was a pretty neat experience and I learnt a lot of cool things. One of the things Sun was touting was the JavaFX family of technologies. It allows you to create RIA (Rich Internet Applications) using JavaFX Script, a domain-specific language built on top of Java. The demos were pretty impressive and it looks like Sun’s answer to Flash and Silverlight. I went to a few JavaFX sessions and I signed up for the preview SDK, which came out a few weeks ago. Since then, I’ve been playing around with the language to see what it can do. The language is pretty neat and being dynamic, has some pretty cool features like closures, list comprehension, lazy/incremental evaluation (through binding), and triggers. In addition, it uses a declarative model (although you can still use the traditional model) for describing a GUI. The API provides Swing components, but I believe the intent is to completely move away from that and use only JavaFX GUI components.

Calendar widget

Using a language that is only in preview is pretty interesting. The API is unfinished and the language isn’t completely mature, but this is to be expected. That being said, it still looks promising and seems to be a very capable and expressive language. Also, seeing as it is built on top of Java, you have access to all of Java’s rich API in addition to the numerous third-party Java libraries and API’s that are out there. I’ve been playing around with it for the last week or so and I was able to write a small calendar widget. It simply shows a month view for the current month, with the current date highlighted. I haven’t had much experience with writing GUIs in Java, so it took me a while to figure it all out. I shamelessly stole the colour gradient background from one of the demos in the preview SDK. The only issue I have right now is the load-time of the widget. It seems to take a while when you load it first. I don’t know if it has to do with the way I coded it or not. I’m pretty sure I’m not doing it the best way, but I expect to get better once I get more familiar with the language.

Here’s a screenshot of the widget running on Firefox 3 on my Ubuntu laptop (the theme is a Leopard theme):

Calendar widget

I have more details on the project page.

All original content on these pages is fingerprinted and certified by Digiprove
%d bloggers like this: