Domain: sun.com
Stories and comments across the archive that link to sun.com.
Comments · 7,362
-
PThreads & Java Threads
However I am looking for a good book on programming threads from an applied point of view. I am looking for one or more texts that provide thorough coverage and provide meaningful exercises. Anyone have any ideas?
I went through grad school not too long ago for Computer Science (disclaimer: it was the kind of computer science degree that doesn't focus on hardware so I might not be the best expert on this). Anyway there were two books for the class.
One dealt with coding regular old C on a plain jain Unix machine and method of (I believe there are others) doing multithreaded in that environment is PThreads (or the super short overview). The book we used is the Addison Wesley book (ISBN 0-201-63392-2). It was informative and comprehensive ... wasn't concentrated specifically on applications like you ask but very good reference. Also, I think there are a lot of good books free online in respect to that topic.
As for Java, there was an O'Reilly book (there's probably a new version out for Java 6) that was pretty good. Not as great of a reference but better on applications of threads in Java. Although, as far as introductory material, I personally learned it all from java.sun.com. Although I can't vouch for whether this is an applied approach or not, I would suggest the concurrency tutorial and a good book on Java Patterns or even a design pattern wiki.
I've never done concurrent programming in C# or Python so I do not know first hand what is best. I do know that erlang has been fun to mess around with in my spare time though!Recently I have been incorporating them more in my solutions for clients.
Most important rule of thumb of multi-threaded programming is to avoid it if possible. Maybe hardware (multi-core) will change that, maybe you feel the scheduler can't do its job as well as you can and maybe you feel it's more intuitive. But, often is the case, that you're just adding more complexity to your code resulting in more difficult bugs and harder maintenance for others. Keep it simple.
-
Mine is bigger than yours!
My e-mail server supports Very Large Mailboxes which provides over 14 messages per US citizen (currently 305,302,563) per folder or 4,294,967,295 messages. How big is yours? (Note that the 2^32 is PER FOLDER...not per account or user.)
-
Virtual World
Why not use something like a Project Wonderland https://lg3d-wonderland.dev.java.net/? It gives you application sharing (VNC on win32 and X on Linux, etc). Also gives you 3D audio, chat, an avatar, a whiteboard and even the ability to phone into the world from a landline (hardware allowing). You can customize the area, add photos using Flickr http://blogs.sun.com/wonderland/entry/flickr_friday. Worth considering IMHO.
-
And this is news why?
There have been smaller webservers made. Just a few
http://www.webservusb.com/
https://research.sun.com/spotlight/2004-12-20_vgupta.html
http://linuxmafia.com/wearables/
http://d116.com/ace/
http://tzywen.com/photos/smallservers/sfarm2.jpgThis after 3 seconds of typing in the search "smallest web server" in google and waiting for 0.11 seconds. So what does this one make it so special?
-
Document your code
Tab out everything in a code block. This should be obvious, but you'd be surprised how bad some stuff is out there. And try not to put in too many one-line ifs without brackets delimiting the code block... you can easily make the mistake of thinking something should be in the if's scope but isn't becuase there are no delimiters.
Comment. Comments are incredibly, incredibly important. They kinda go along with an overarching "don't be a douche" rule; while you may know what's going on in your own code, if it's at all complicated, tell the reader what it's doing. If you don't, someone is going to be very pissed at you later. If you want to go above and beyond, do Javadoc (or other style appropriate to your language) comments where appropriate; a lot of IDEs actually hook into them so you can highlight a method and see what it's doing.
And try looking at / working on some open source stuff as well. The big apps usually have a coding style they follow throughout and aren't that bad for a reference.
-
Sun has already tried Linux
"Sun, he declared [Jim Zemlin], should just move over to Linux."
In fact, Sun has already embraced Linux without very much succes, see :
http://www.sun.com/software/linux -
Re:How about some technical analysis
Let me add some more: I can't, for the life of me, imagine Linux running on Computed Tomography scanners.
That would be horrible, that would be criminal...You often see Sun - and I suspect Solaris - on medical hardware. There must be a reason for that...For instance,
http://www.sun.com/solutions/documents/success-stories/HC_Philips_BB.xml
-
Re:Actual Information
Actually, you can borrow stuff from my datacenter. You just have to promise to consider buying it!
-
Re:A one / two page version of this book?
[I'm the reviewer]
There are several resources out there. For example, here's the code conventions for Java:
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
The best thing is to simply find out what your team is doing and document it. Then read the book to see if there are ways to improve what you are already doing.
If you'd like to contact me, I'd be happy to talk about what I've done with my teams (foyc at cornet design dot com)
-
Re:No need
I really doubt that your Java JITs are going to be good enough to make things like 3D games perform as well as native on current smartphone processors.
Many cell-phone games these days are programmed in Java (yes, even 3D.
Besides that, as I oddly keep having to repeat to seemingly deaf ears, the phones will all have custom chips to accellerate Java performance - and of course the 3D library used will simply access native libraries to boot.
-
Re:To help people search for music they might like
I like listening to one genre, and then switch to another genre, and the programs are unable to provide that.
Not so, Arthur Flexer and co. had a great paper at the conference in question on generating playlists with a specified start and end songs. The system attempts to make smooth transitions between songs that take you through N tracks from the track you started with (in one genre) to your end song (potentially in another genre), passing through whatever is in between. I believe its a publicly available on an http://fm4.orf.at/soundpark">Austrian radio site. Paul Lamere at Sun Labs (on the 'Search inside the music project') did something similar with what he called musical journeys. Leave work in a sweat listening to Heavy Metal and arrive home to see your family with a some mellow Jazz Theres talk of evaluating playlist generators at next year's MIREX evaluation. However, I have as yet no idea how we'll evaluate them for performance or compare different ways of 'seeding' a playlist (one track, many tracks, some tags, specified start and end tracks etc.).
-
Re:To help people search for music they might like
I like listening to one genre, and then switch to another genre, and the programs are unable to provide that.
Not so, Arthur Flexer and co. had a great paper at the conference in question on generating playlists with a specified start and end songs. The system attempts to make smooth transitions between songs that take you through N tracks from the track you started with (in one genre) to your end song (potentially in another genre), passing through whatever is in between. I believe its a publicly available on an http://fm4.orf.at/soundpark">Austrian radio site. Paul Lamere at Sun Labs (on the 'Search inside the music project') did something similar with what he called musical journeys. Leave work in a sweat listening to Heavy Metal and arrive home to see your family with a some mellow Jazz Theres talk of evaluating playlist generators at next year's MIREX evaluation. However, I have as yet no idea how we'll evaluate them for performance or compare different ways of 'seeding' a playlist (one track, many tracks, some tags, specified start and end tracks etc.).
-
For more reading about ISMIR ...If you are interested in learning a bit more about ISMIR check out some blog posts about the conference
From a researcher at Last.fm: http://mir-research.blogspot.com/2008/09/ismir-2008-demos.html
A researcher from strands: http://www.scwn.net/2008/09/ismir-past-present-and-future/
And lots of posts from my blog:
-
For more reading about ISMIR ...If you are interested in learning a bit more about ISMIR check out some blog posts about the conference
From a researcher at Last.fm: http://mir-research.blogspot.com/2008/09/ismir-2008-demos.html
A researcher from strands: http://www.scwn.net/2008/09/ismir-past-present-and-future/
And lots of posts from my blog:
-
For more reading about ISMIR ...If you are interested in learning a bit more about ISMIR check out some blog posts about the conference
From a researcher at Last.fm: http://mir-research.blogspot.com/2008/09/ismir-2008-demos.html
A researcher from strands: http://www.scwn.net/2008/09/ismir-past-present-and-future/
And lots of posts from my blog:
-
For more reading about ISMIR ...If you are interested in learning a bit more about ISMIR check out some blog posts about the conference
From a researcher at Last.fm: http://mir-research.blogspot.com/2008/09/ismir-2008-demos.html
A researcher from strands: http://www.scwn.net/2008/09/ismir-past-present-and-future/
And lots of posts from my blog:
-
For more reading about ISMIR ...If you are interested in learning a bit more about ISMIR check out some blog posts about the conference
From a researcher at Last.fm: http://mir-research.blogspot.com/2008/09/ismir-2008-demos.html
A researcher from strands: http://www.scwn.net/2008/09/ismir-past-present-and-future/
And lots of posts from my blog:
-
Re:Excellent Post
Here's what I got, so far. Sorry it's not tabbed and cross-referenced...
http://ask.slashdot.org/article.pl?sid=08/09/17/224230 -- in case anyone wants this page, too
http://www.quickref.org/
http://gotapi.com/
http://www.regular-expressions.info/ -- regular expressions
http://www.perlmonks.org/
http://www.rosettacode.org/wiki/Main_Page
http://perldoc.perl.org/
http://www.perlbuzz.com/
http://java.sun.com/reference/
http://forums.sun.com/index.jspa
http://developer.mozilla.org/ -- javascript
http://www.w3.org/MarkUp/Guide/
http://www.w3.org/MarkUp/Guide/Advanced.html
http://www.w3.org/TR/html4/
http://www.w3.org/TR/xhtml1/
http://www.w3.org/Style/Examples/007/
http://www.w3.org/Style/Examples/011/firstcss
http://www.w3.org/Style/CSS/learning
http://en.wikibooks.org/wiki/Programming:Tcl
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/
http://cprogramming.com/
http://www.cplusplus.com/
http://cm.bell-labs.com/cm/cs/cbook/
http://www.parashift.com/c++-faq-lite/
http://en.wikibooks.org/
http://developer.apple.com/
http://cocoadev.com/
http://www.cocoabuilder.com/ -
Re:Excellent Post
Here's what I got, so far. Sorry it's not tabbed and cross-referenced...
http://ask.slashdot.org/article.pl?sid=08/09/17/224230 -- in case anyone wants this page, too
http://www.quickref.org/
http://gotapi.com/
http://www.regular-expressions.info/ -- regular expressions
http://www.perlmonks.org/
http://www.rosettacode.org/wiki/Main_Page
http://perldoc.perl.org/
http://www.perlbuzz.com/
http://java.sun.com/reference/
http://forums.sun.com/index.jspa
http://developer.mozilla.org/ -- javascript
http://www.w3.org/MarkUp/Guide/
http://www.w3.org/MarkUp/Guide/Advanced.html
http://www.w3.org/TR/html4/
http://www.w3.org/TR/xhtml1/
http://www.w3.org/Style/Examples/007/
http://www.w3.org/Style/Examples/011/firstcss
http://www.w3.org/Style/CSS/learning
http://en.wikibooks.org/wiki/Programming:Tcl
http://www.acm.uiuc.edu/webmonkeys/book/c_guide/
http://cprogramming.com/
http://www.cplusplus.com/
http://cm.bell-labs.com/cm/cs/cbook/
http://www.parashift.com/c++-faq-lite/
http://en.wikibooks.org/
http://developer.apple.com/
http://cocoadev.com/
http://www.cocoabuilder.com/ -
More details and a correction re failure ratesMinor correction: according to the article the failure rates nearly doubled. There were 1000 servers in a trailer; 500 with and 500 without AC. The ones with AC had a 2.45 percent failure rate, and the ones without 4.46 percent. That's an 80% increase, not 0.6%.
Sun is also running a comparable experiment with Belgacom and allows you to log in to a live interface to view stats on in- and outlet temperatures and more at http://wikis.sun.com/display/freeaircooling/Free+Air+Cooling+Proof+of+Concept For more details and analysis see http://www.datacenterknowledge.com/archives/2008/09/18/intel-servers-do-fine-with-outside-air/ or http://securityandthe.net/2008/09/18/intel-sees-the-future-of-datacenters-and-it-does-not-include-airconditioning/
DC Knowledge also has a nice video of this experiment at http://www.datacenterknowledge.com/archives/2008/09/18/video-intels-air-side-economization-test/
-
All +5 moderated links
http://www.perlmonks.org/
http://en.wikipedia.org/wiki/Scheme_(programming_language)
http://www.schemers.org/Documents/Standards/R5RS/
http://srfi.schemers.org/
http://mitpress.mit.edu/sicp/full-text/book/book.html
http://www.quickref.org/
http://java.sun.com/javase/reference/api.jsp
http://www.rosettacode.org/wiki/Main_Page
http://cprogramming.com/
http://www.stackoverflow.com/
http://cm.bell-labs.com/cm/cs/cbook/
http://yutaka.is-a-geek.net/
http://www.gotapi.com/
http://www.open-rsc.org/
http://www.users.bigpond.com/robin_v/resource.htm
http://www.geocities.com/orion_blastar/contact/
http://en.wikibooks.org/ -
C/C++/Java/Perl/Python references
C
The GNU C Library
http://www.gnu.org/software/libc/manual/C++
Standard Template Library Programmer's Guide
http://www.sgi.com/tech/stl/Boost C++ Libraries
http://www.boost.org/doc/libsJava
Java(TM) Platform, Standard Edition 6 API Specification
http://java.sun.com/javase/6/docs/api/Perl
Perl version 5.10.0 documentation
http://perldoc.perl.org/Python
Python Library Reference
http://docs.python.org/lib/lib.htmlFor learning C and C++, I recommend these books:
Kernighan, Ritchie: The C Programming language
Kernighan, Pike: The Practice Of Programming
Koenig, Moo: Accelerated C++: Practical Programming by Example
Sutter, Alexandrescu: C++ Coding Standards -
Java
I think for java, nothing beats this: http://java.sun.com/reference/api/index.html
-
Re:Java.sun.com
There is also the Java Forums which is a great place to ask people to do your intro CS homework and get flamed.
-
Here are a few:
Java:
http://java.sun.com/javase/6/docs/api/
I do a little happy dance in my head every time this site helps me out. it's a bit intimidating until you use it, then it becomes the best java reference you could ask for.
Ruby:
use fxri. in windows, it's not just a live command-line style interpreter, it has a dictionary of relevant terms to search through to boot. it's like having a terminal inside of a reference book, and you shouldn't pass up the opportunity to try it out.
php:
http://www.php.net/docs.php
this one I use every time I use php. Not only does it tell you what everything does, but it tells you what's bugged, and how, and that way you can work around what would otherwise be a nasty problem.
I use these constantly at my job (fxri is the only calculator I know of that can calculate the factorial of 6022, so I use it for all my calculations!) and I hope you find them just as useful as I do. -
Re:Java.sun.com
I agree. I have been using Java for a while now and have always found the information I needed at java.sun.com. Just about anything you could want to know about Java can be found in the reference section. The API section has all of the classes listed alphabetically for the more recent versions of Java with a fairly detailed description of each class and its methods.
-
Re:Java.sun.com
I agree. I have been using Java for a while now and have always found the information I needed at java.sun.com. Just about anything you could want to know about Java can be found in the reference section. The API section has all of the classes listed alphabetically for the more recent versions of Java with a fairly detailed description of each class and its methods.
-
Re:Java.sun.com
I agree. I have been using Java for a while now and have always found the information I needed at java.sun.com. Just about anything you could want to know about Java can be found in the reference section. The API section has all of the classes listed alphabetically for the more recent versions of Java with a fairly detailed description of each class and its methods.
-
Re:Java.sun.com
http://java.sun.com/reference/
Samples, API, Docs, Tutorials, etc.
(redudndant, but people usually like links) -
Re:Perl and Python
Agreed. I'd also add Perlmonks.org; it's not documentation per se but it's damn useful.
For java, you have to master the API...Even modules that other people write are often documented with javadoc, and look just the same. Once you use it for a while it becomes familiar.
-
Java!
So this isn't my favorite language. Heck, I barely even know the language. But!
http://java.sun.com/javase/6/docs/api/
Can I has karma now?
-
Java 6 API Reference
The Java 6 API reference.
-
Not expensive, not a desktop
Vista jokes aside, this is an HPC/Server system, not a desktop. And as such, it's a long way from being the most expensive Windows system you can buy. A fully loaded Sun Fire X4600 M2 can run you more than $35K.
-
Re:Simple:
Ive heard stories that relate to this. And its not that someone outside hooked this piece of equipment up, its something they have forgot about.
I read about a server that was in a room, and the room had some modifications done to it, and they ended up drywalling the server inside the wall (i dont know know how they did it). It ended up being like 5 years later they had no idea where this PDC signal was coming from and they had to physically follow the network cable to the computer and found it.
I found the story, kind of:
Server 54 -
Re:Sparcstation In The WallOh I'm fairly sure it happened to someone at some point in some form. I'm just curious as to how many of the incidences I've heard are actually the case, or more an 'adopt an urban legend' cases.
I mean, Sun has the 'Server 54' reference from 2001: http://www.sun.com/smi/Press/sunflash/2001-05/sunflash.20010521.3.xml
-
Sun Datacentre Design
I can't seem to find the video I'm looking for but I'm a fan of the new Sun Data Center cooling design. Works on the idea of cooling each cab individually and not all the rest of the rubbish air floating around. I know its been done before but this time its done right. Info somewhere here
-
Global load balancing
We all learned it during the 1970's "energy crisis", the problem isn't lack of energy. The problem is that the energy is in the wrong form in the wrong place at the wrong time. IT does have a solution for that, Global demand load balancing. Outsource your IT demand to a server in Iceland or somewhere else where energy is cheap and clean. Putting your PCs and servers in big cities where both energy and real estate is expensive is already as out of fashion as 10$ oil, Microsoft Windows and Reaganomics.
-
Re:Misleading summary
Strange post. Maybe I am missing something? For your first paragraph...
Of course there's much more out there.
Regardless, the bulk of this setup is clustered processing a shitload of data very fast, which is something that COM+ triggers on MSMQ is pretty damn good at. The automation event processing system I work on at the moment can handle a full gigabit eth pipe using MSMQ on my shitty $700 laptop at about 20% cpu, including processing, logging and updating appropriate stuff in a database and HMI app.
...and this is just a bunch of subjective MS fan boy ranting.
-
Re:Slashot? Hockey?
-
Re:On tabs crashing
-
Re:Non-Tech Percent of Web Traffic from Chrome
Gmail & scripts may be running faster but try a java app. You need V6 update 10 (beta also and buggy with my app). Flash also needs work, very laggy with keys pressed (flash games). http://www.google.com/support/chrome/bin/answer.py?answer=95282&query=java&topic=&type= Developers and Webmasters: JavaPrint Google Chrome requires Java version 6, update 10. Please note that this is currently a beta version and may be more unstable than some previous version of Java. To download this beta version of Java, visit http://java.sun.com/javase/downloads/ea.jsp
-
Re:First Crash
can't load java applets by default (says no plugin available, doesn't prompt for downloading one). you'll need to download the rc of update 10 for java 6 to get java apps to work in chrome. http://java.sun.com/javase/downloads/ea.jsp
-
Re:The real reason this is News for Nerds
All joking aside, does anyone else get the feeling they're changing the definition of a sunspot just so they can claim it was a spotless month?
Sure, companies cook the books all the time. Why should Sun be any different? A spotless month sounds great to shareholders.
-
Re:I beg to disagree
The problem is that java is so f***ing complicated that you would need a 3D map to start with it.
With all respect to you, but I'd say this is complete BS. I am telling you, man, on the time ago when I had to start with Java thing, it took for me a week to figure out entire language and basic frameworks to start making SOA on GlassFish and Swing clients just as it is. All you have to do is to learn how to read books...
Java is very easy language in compare to C/C++...
Answering question to the author, it is like this:
- Get NetBeans IDE at http://www.netbeans.org/
- Go read tutorial on Sun Microsystems: http://java.sun.com/docs/books/tutorial/
- Get Spring framework and get understand it how it works and why it is good idea.
- Go recursively to each interesting topic and investigate it till the last bit.
- Additionally, as moral support, go read [again] "Hacker Howto" if you have doubts -- http://www.catb.org/~esr/faqs/hacker-howto.html
- Have fun!
P.S. Works for me...
-
try: java.sun.com
try java.sun.com and click on the learning link.
also use netbean for codding it realy helps
PS. Why dose slashdot require www. at the start of urls thats realy stufed up -
Sun Java Tutorial
Wow, what a load of advice to launch into frameworks, buy books, get certification etc.
Start with what's authoritative, basic, and free. That's the Sun Java Standard Edition tutorials
http://java.sun.com/docs/books/tutorial/
Or download from:
The web and persistence frameworks are important. They're over-engineered and I hate them but if you don't know them you won't get work. (Without them it'd be very much like trying to become a game developer knowing only ANSI standard C and no frameworks). They're what you need to learn second. Possibly on a smaller project where you're not the lead. However learn to crawl before walking or flying.
-
Sun Java Tutorial
Wow, what a load of advice to launch into frameworks, buy books, get certification etc.
Start with what's authoritative, basic, and free. That's the Sun Java Standard Edition tutorials
http://java.sun.com/docs/books/tutorial/
Or download from:
The web and persistence frameworks are important. They're over-engineered and I hate them but if you don't know them you won't get work. (Without them it'd be very much like trying to become a game developer knowing only ANSI standard C and no frameworks). They're what you need to learn second. Possibly on a smaller project where you're not the lead. However learn to crawl before walking or flying.
-
Sun's own Tutorials are a good reference
For the "why and how" of using the Java libraries, I think Sun's own tutorials are a good starting point. They don't cover all technologies, but they provide pretty good coverage of the core set of libraries, complete with sample code. And they are regularly updated, easily accessible and free, which is more than can be said for the typical Java introductory book, which doesn't contain that much additional information.
You are right that the API docs don't provide this, but they are not intended to. In places they do link to the tutorials, although it could be more frequent. Actually I think good documentation is one of Java's strength; immeasurably better than MSDN and quite good compared to, for example, the Python documentation. They lack the elegance of Kernigan & Ritchie, but then Java is a more complicated environment.
But I admit that there are gaps. For example, I don't think Sun's tutorials describe how to define a custom event, although these quickly become useful if you do more than very basic GUI programming. Of course you can always Google for these.
As for topics to start with, it's been a while since I started to learn Java from a C++ background. I agree that the step is not that big, but it's worth devoting some time to the mechanisms of event handling, multi-threading, and the Collections framework. These are too important to skip, and may hold a few surprises.
-
A few suggestions
Read Josh Bloch's book "Effective Java", some parts of it deal specifically with how to switch from C++ to Java. http://java.sun.com/docs/books/effective/
Get the source code for the JDK and look through it. The collections classes are well-documented (again, by Mr. Bloch) and interesting to read through. A few other projects seem well-written, like the google collections and jgoodies bindings. Reading through the source code can be fun and informative.
Get a good IDE like IntelliJ, and pay attention to the little warnings it displays about your code. I've learned a few things just from the refactoring suggestions it pops up. Plus, Java (being typed) is really ideally suited for a powerful IDE, not like scripting languages.
Have fun!
-
Javadocs is your friend
Also you can download javadocs onto your hard drive to see the object oriented relationship and class structure of all the core Java api's. Whats great about javadocs is that its a tool that will automatically autodocument your whole program for you in the same tree structure. All you have to do is put a "///" instead of a "//" and your comments will be recorded in the html tree of your documentation as well. No other language comes close to this besides perldocs. Sandcastle is Microsoft's way of a javadoc knockoff for c# but its not finished yet.
This of course assumes you know how object oriented programming works which you do according to your experience in C++. You can learn java quickly if your familiar with these concepts as even data types such as strings and integers are objects in Java.
I used the sixth edition of this book when I took advanced java programming in college which is very detailed with over 10k lines of code. Its very academic oriented if you do not mind it but has directions on how to do almost anything. You can skip sections such as if/then structures and see how the memory reference object oriented model works and how its different from other languages.
This newer edition even has tutorials on ajax. Damn I am tempted to get it.
Keep in mind I have not written a line of code in over 2 years and am not a professional programmer so take what I say with a grain of salt.
However I do agree with others here that unless you have real work experience with java that you will be turned down from any job requiring it regardless of your experience. HR wants the impossible and do not understand programmers. They think programmers who use different languages can't learn another and they also worry about retraining costs. If all they have is an entry level budget then they can hire an Indian to do the work for alot cheaper sigh.
If i were you I would write small applications in java at work for small intranet sites so you could claim you have X amount of years of experience web programming and used java. This will satisfy the HR weenies so you can then interview and you can show your better for mission critical work than abunch of Indians. (Perhaps this is why I do not want to work in I.T. again)
Do not mention you programmed in Java for X years. Just mention that you programmed for X years and used Java and this will get you past the filter. But try it at work with something small.