- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Admin
I think those names derive more from the fact that the first three months of the year used to vary (Smarch (not rally, but couldn't resist - Mercedonius really) was occasionally included as a leap month after a varying length February), so the "real months" started from March (which then becomes month 1). Interestingly, this system takes a similar approach and requires March to be the first valid month....
Admin
[quote user="corwin766"][quote user="C-Octothorpe"][quote user="lesle"][quote user="QJo"][quote user="GalacticCowboy"] Then there was the place where our username used to be our first name (or diminutive) concatenated with the first letter or our surname. Yes, Chris T had an attitude problem.[/quote]
The government agency Miguel Orona worked for was first initial, last name. The poor guy was known (true) as morona.[/quote]I'd hate to have the name Maurice O'Lester...[/quote] I was at one place with the rule. Worked with an African American named Alan Ryan. [/quote] I find it a little disturbing that a priest by the name of Bernard Angus decide to use a similar naming mechanism for his email....
Somehow, a church bulletin with bangus@some_isp.com as the contact seems a little inappropriate.
Admin
Admin
FTFY ;-)
Admin
... And btw having an explicit list of fields in this instance is more trouble than it's worth, if nothing else in terms of maintainability.
Lost count of the number of times explicit lists have caused headaches when a select * would have been much better.
Admin
Of course ours is VARCHAR(15) so we can fit 'Unspecified' in there.
Admin
Admin
As the movie Hackers told us, one of the most popular passwords is god. So maybe someone should try it.
Admin
+300 Cried laughing.
Admin
10 is no more handy than any other number base from that perspective. You can express fractions using a base-radix system (which is what I presume you're referring to) in any number at all (as long as it's greater than 1).
In fact there's no mathematical limitation to integers, or even rationals, or even reals. According to this: http://en.wikipedia.org/wiki/Complex_base_systems ... a number base can even be complex.
Admin
On the other hand, maybe the extra time spent also results in a design paradigm that produces more reliable and/or efficient code. In which case not only is the code going to run quicker and/or less resource-intensively, but you are saving a hitherto unmeasured quantity of time spent bugfixing.
Admin
There's another type. It's the type that knows they're only average, but mock by saying they're oh so great and never ever have a bug and are god programmers, all with a huge grin on their face while seeping through a whole ooze of sarcasm. (I'm quite guilty of that, btw. Although I don't know if they caught on to the sarcasm...)
Those that really are that smart and good at their programming language, tend to stay silent about it, so they can work on their projects instead of having to deal with the hordes of people who'll go: "Oh I had an idea can you make it for me" and then bug them all evening 'bout it, and the day after, and then forget all about it. That crap's good for the wannabes and for the beginners to get some experience. I think as soon as you become an average programmer, you'll sigh and try to get away from that. For really good ones, it'd be even more frustrating. Hence them probably not boasting their skills.
Admin
Admin
Admin
I was going to jump on the bad estimate bandwagon, then found it had been well covered. I too knew what he meant, and my only concern was that occasionally managers hit this site, and they sometimes know arithmetic. I didn't want them getting the wrong idea.
rar
Admin
To put it another way: I would rather spend an extra day or so up front so as to save me half an hour further down the line. Because that half an hour down the line is usually vitally more valuable.
Simple things like adding error trapping to your build scripts, making sure your error messages interpret the error codes into English, parameterising those magic numbers you know you're never going to want to change ever, and so on.
Oh, and it goes without saying you set up the infrastructure to implement your unit tests before you started, doesn't it?
I've found that when "engineers" explain that they haven't got the time to do this boring stuff at project start, what they mean is they haven't got the patience, because they can't wait to get cracking on the exciting code cutting. To which I say, forget the code cutting, I'm going to embark on an exercise in staff cutting.
Admin
Ah, it looks like my comment sparked a (small) discussion.
Indeed, the numbers I mentioned were arbitrary, and even a bit ironic. But I did have a specific example in mind.
At work, we do everything in Java, and some years ago, it was decided to have web services to be self-contained, meaning that they should be using javax.xml.ws.Endpoint (introduced in JAX-WS 2.0) instead of Tomcat to run them.
But this would mean having to modify the build.xml file for each project for each developer, so that a .jar file would be generated in addition to a .war file, and a whole lot of things that are just dumb and error-prone.
So, I decided to write a little application that loads a .war file, looks for the web services, and starts all of them as endpoints.
The trickiest part was actually to write a class loader that is both efficient and loads classes and resources from a .jar file inside of a .war file, inside of a .ear file if necessary.
(Truth be told, my attempts to introduce some sort of caching led to strange class loading errors that aren't very easy to solve in a reasonable amount of time. Now, with Java 7's NIO libraries, I intend to rewrite the archive class loader.)
And guess what? It's become a critical application. The support people love it, because it's light-weight and uses all of our standard libraries for configuration and such, and the developers love it because they can run their web services on both Tomcat (to test) and on ws-run, without any modifications.
Call it laziness or foresight, but in this case it was a success, even though the initial outset was that I didn't want to do a lot of boilerplate code for each project.
Admin
+1 There's so many levels of win here.
Admin
That man is a legend
in his own mind.
Admin
Admin
Admin
Read my explanation a couple of postings above; it should become clearer how spending a week (more or less; all in all, we probably spent more time on it than just a week by now) can help several teams across the entire organisation, in a way that is very hard to quantify in time saved. It's more than just the 10 minutes per project; it's also the elimination of a potential source of mistakes, and a simplification of a couple of other processes.
Admin
How's Queen Lisa been?
P.S. now I have that song stuck in my head and I hate you :)
Admin
Ha! Now you work at the Pizza Pizza.
Admin
Admin
Admin
This would be the sort of boss who would fire you for disobeying his short-sighted, bean-counting orders. Run for the hills from him and all his kind who don't trust the engineers to make their decisions, and who micromanages all the juice from everything they touch.
Admin
Is this a variant on "Send me teh codez"?
Admin
Actually, this code will never work ever.
Did anyone else notice the variable names are misspelled?
$three_last_yearmonths doesn't exist. Oops.
Admin
No, that would be
I dnt suppze this codez is availalbe ousidez youre organation...{you get the idea}... reinventz teh wehelz.
Admin
I've seen similar in code I've got to maintain. The function got user ID passed on as uid (which is the common way of calling it in that framework). They then kept using iud. Their SQL query also was written horribly. It was supposed to pull the user's profile node from the nodes table. That nodes table is a reference list of all nodes + types + author. So what they had to do, is add a WHERE type = 'profile'. But noooooooo, just "SELECT * FROM nodes WHERE uid = %d" and then replacing %d with iud. The most surprising thing is that it took several maintainers and over a year before it got noticed. My fix: Took that whole function out and wrote it properly -- no misspellings, the proper query and no messing about for bugger-all afterwards.
Admin
Admin
Ray, when someone asks you if you're a god, you say "YES"!
Admin
Admin
Courtesy of god mangling dates, today is still yesterday.
Admin
It seems to me that most if not all of the people I've worked with who really were geniuses didn't go around telling everybody that they were geniuses. They just did brilliant things, and let everyone else say that they were geniuses.
Maybe if you find it necessary to tell everyone that you're a genius, this is because no one can see it for themselves by looking at your work. They're all fooled into thinking it's very ordinary. I'm sure that you're convinced it's because they're all too stupid to recognize genius when they see it.
Admin
I've never been to Spain, but I've been to Oklahoma.
Admin
Perhaps he was simply taking Winston Zeddemore's advice... though why someone would ask that question is beyond me.
Admin
I once worked with a guy named Rich Everhard. At one point, he did change his name...to "Everhardt".
Never did understand why Rich chose to go through that trouble and not take care of the seemingly obvious problem.
Admin
I can reassure you that he is God, as only God can make a year has 99 months.
Admin
Admin
It's ok, it's 100 months/year, because god uses 0-based indexes.
Admin
(Explanation: there are national companies all around, and all of them have outsourced their software development, except ours because our wages are low enough.)
But nothing is stopping me from describing what the program does.
Before I start, though, you have to make a choice, whether you want to do it the complex way and write a classloader that will load directly from a WAR file, or whether you're happy to just load from an unpacked WAR file. You save yourself a lot of trouble if you do it the latter way, but the former way is more elegant.
First, find the schema of WEB-INF/sun-jaxws.xml. Use JAXB to create a class of that, saves you a bunch of XML parsing. Then, load that file, instantiate the JAXB object and invoke the 'getEndpoints().getEndpoint()' method on it, which returns a list of EndpointType objects.
Find the class name of each web service (there may be more than one) with the getImplementation() method. Instantiate this class (you may need to load it before if you go down the classloader path with ClassLoader.loadClass), create its URL with the getURLPattern() method, create an endpoint with Endpoint.create(yourWebServiceClass) and publish it with endpoint.publish(yourWebServiceURL).
If you want HTTPS, you'll have to do the bit with the key store, key manager factory, trust factory, SSL context, HttpsConfigurator and HttpsServer. Example code is easily found with Google - that's what we did. Instead of publishing the endpoint using the URL directly, you need to publish it on the context that you get when invoking the createContext(yourWebServiceURL.getPath()) method of the HttpsServer object.
Now, the tool that we're using is obviously a bit more complex than that. For example, it has a logger that logs all XML requests using log4j. It also uses our standard configuration libraries, that load the configuration file(s) from an externally defined path and represent them as Java object - another one of those little libraries that make your life as a programmer a lot easier.
Finally, it uses a library to run as some sort of service, so that startup and shutdown (using a ShutdownHook) are done in a standard way, logging is initialised, etc. Also, it installs a security manager so that a call to System.exit() does not shut down the program.
If you have an idea what to do, it shouldn't take you more than a few days to write it, including testing. But this is a tool that will likely get extra functionality over time, so start with simple functionality, and take it from there.
Admin
TRWTFS TRWFSTS IS IMAGEMAGIC ISTNEAD OF IMAGEMAGICK WTF WTF!!!!
CAPATCHAA!!! PECUS!!!
Admin
Blasphemy :D
Admin
Is referring to columns as "rows", twice in one sentence, laziness? Probably not. After some thought, I knew what you meant.
But you weren't careful! That kind of laziness can be a liability... And you couldn't be bothered to use the proper words... :-)
Admin
Finally, people that get the reference!
Admin
I bet he was using jpgraph. That's the simple way to deal with dates on the x-axis (after which you can shove in the correct values manually). The correct way requires a few more lines of code.
Admin
Funny thing was that I had no idea Weird Al's King of Suede was a parody of King of Pain until someone posted on alt.music.moxy-fruvous - yes, it was back when USENET was a thing - their "adjustment" of the King of Spain lyrics to fit the King of Pain music.
(FYI, King of Suede is one of the few Weird Al songs I actively can't stand. And I've been to see him in concert 27 times. I almost don't want to go to another one cause I want to hold onto that 27 lol)