Coder's Revolution

Do you want a revolution?

Category Filtering: 'Java'

Generating Primes Revisited: My Modifications To The Sieve of Eratosthenes

ColdFusion, Java, Mathmatics, Performance
In a recent pissing match between ColdFusion and PHP, Jared Rypka-Hauer was demonstrating the performance of a function that generated prime numbers. The discussion really wasn't about the BEST prime generator as much as it was about how much ColdFusion can kick PHP's puny butt all over town. Never the less, I piped up in the comments to ask Jared to compare a prime number generator that I wrote a while back based on the Sieve of Eratosthene. After Jared asked some good questions about how my code worked I figured it was time I stopped high-jacking the comments of the PHP pooper train. I decided to spin off a new post to highlight some significant performance gains I was able to produce.
0

JVM Args Don't Like Line Breaks

ColdFusion, Java, SeeFusion, Server Administration
A brief hiatus today from from the PCI Compliance series to issue a quick public service announcement. I was installing my free copy of SeeFusion today that I netted in the recent give-away WebApper had. Since the target machine was CF7 on a OpenSuse Linux with the JVM upgraded to 1.4.2_11, it was a "manual" install. Pretty easy-- copy a few jar files and edit a few configs. The problem was, SeeFusion wasn't able to connect to my debugging port to capture stack traces and I couldn't figure out why.
3

Taming The Header Output Of CFHTMLHead and CFAjaxProxy

ColdFusion, Java
Tags like CFHTMLHead, CFAjaxProxy, and CFAjaxImport don't output their content into the regular ColdFusion output buffer. Instead they put their contents into a special header buffer which is dumped into the beginning of the output right before the request is sent back to the client. But what if you want control over where their output goes? CFSaveContent doesn't work on these bad boys. And even worse, <cfcontent reset="yes"> doesn't get rid of their output. The other day I got bit when trying to return the HTML of a rendered view via a proxy in ColdBox as a JSON string. The JavaScript output of the CFAjaxProxy tag was being appended to the beginning of the response and causing the result to not be valid JSON.
8

So, I Wrote My First "Hello World" Android App...

AIR, Android, Flex, Java, Technology
My friend John dreams 3 or 4 get-rich schemes every week. Most of them involve technology, and he generally tries to talk me into helping him with them. He can never be dissuaded from the belief that each of his brainstorms are nothing short of an entrepreneurial pot of gold. These revelations, of course, come despite the fact that he has virtually no programming experience and even less start-up capital. Most of his recent ideas have all been centered around the new Google Android phones and the ability to write apps for them. After listening to him babble about Android app development for several weeks straight, I decided to download the Android SDK and play around with it.
4

ColdFusion's Object Instantiation Penalty: How Bad Is It?

ColdFusion, Java, Object Oriented Design (OOP), Performance
There has been a lot of talk recently about design patterns aimed at circumventing the overhead ColdFusion imposes upon us when creating CFCs. I'm not sure who coined the term "Object Instantiation Penalty", but the first reference to it I can find in the CF community was over at the Dot Matrix blog. Everyone seems to agree that object creation in ColdFusion leaves something to be desired, but I haven't seen anyone really quantify the price yet. I decided some line charts were in order.
5

Sun's Download Page For Legacy Versions of Java

General, Java
I can never find this stupid page when I need it, so I am linking to it here so I won't lose it again. Use this when you want to download a specific JDK from Sun's site and don't want to wade through their confusing-as-heck "featured downloads" mess. http://java.sun.com/products/archive/ Update-- the URL appears to have changed. I'll put it here in case they ever deprecate the old one. http://www.oracle.com/technetwork/java/archive-139210.html
0

OO Design Patterns and IBO

Ajax, ColdFusion, Java, JavaScript, Object Oriented Design (OOP), Technology
If you missed it, Jeff Chastain put up a very interesting post over at Alagad's Blog. Also good was the "spirited" discussion that followed between Barney and Peter Bell. I don't know how I feel about all of it, but the entire thing is very fascinating.
11

Does OOP Encourage RBAR?

ColdFusion, Java, Object Oriented Design (OOP), Performance, SQL
I've been staring at my computer monitor trying start this paragraph for about 10 minutes now, so I'm just going to start typing. I've been thinking about system design. Organization versus performance. Design patterns versus efficiency. We adopt some code without thought to its performance because we're talking about milliseconds, and the readability, organization, and structure gains our apps enjoy are well worth it. I'm not sure that is always the case though, and we don't notice it until too late.
7

Confessions of a speed junky: How I made my code faster

ColdFusion, General, Java, Performance
The past couple of days I've been messing around with a couple functions, cleaning them up a bit to blog about them. One of them is for color-coding SQL and the other for highlighting differences in two strings. Both are pretty small, but very repetitive in what they do. Depending on the size of the text you are processing, performance varied. Sometimes the code inside was repeated hundreds of thousands of times given a large enough test.
14

Put down the keyboard and step away from the computer

ColdFusion, General, Java
Research shows that driving while extremely tired renders the same results as driving drunk. Following that same line of though, is coding while sleep deprived the same as writing your code in a drunken stupor?
0