I don't really know Java, but I would assume... That at 128, new objects are instantiated for each Integer while there are existing objects cached for a range up to 127?
Posts made by quamaretto
-
RE: Classic Java language WTF
-
RE: Is this monomorphism?
Hmm... -e is an operator, not a function. The guy could have created the function so that he could use it in later HOFs, but probably not. :)
I agree that the -e thing is weird. I personally think that Larry should have made an effort to eliminate every conceivable feature of Perl 5 that would leave a recognizable language, rather than throwing it away to make Perl 6. (This is somewhat the aim of use strict; but that won't eliminate any operators.)
-
RE: Is this monomorphism?
Every function call, class method call and instance method call gets arguments the same way: The array named _. If you simply don't know any Perl at all, yes, it's frequently easy not to know what's going on. (Okay; prototypes change this, but the use of them is not recommended and not really idiomatic.)
However, receiving arguments is almost totally idiomatic in code on CPAN: It's "my ($a, $b, $c) = @_;" or "my $a = shift". There's an infrequent exception of taking a list or dictionary of something in the parameters, and then the arguments are still just a freaking array that you turn into whatever you need.
(The first module I came to is http://search.cpan.org/src/MEWSOFT/Religion-Islam-PrayerTimes-1.02/lib/Religion/Islam/PrayerTimes.pm which is basically just as I described.)
-
RE: Rebellion Against Rebellion Against Advertising
@rbowes said:
This just in, changing the channel during commercials is now stealing.
News at 11.
That one's more a grim, oncoming reality than a joke.
-
Enterprise Manager Choices
Oh, Enterprise Manager, you cad.
See how it's giving me a choice of what to do? Good exception handling! Good catch. Here are my options:
1. Clicking Yes- this causes Enterprise Manager to try to reconnect to the database and then bring up the same question again.
2. Clicking No - this causes Enterprise Manager to try to reconnect to the database and then bring up the same question again.Did I mention this is a modal dialogue?
*Bang head*
Also, we're all locked out of source control because we forgot to actually buy a license for it.
-
RE: A perfectly acceptable software license
I would be careful... They could be using a very, very small font.
Or, you know, it says read the following license agreement carefully, so maybe you have to click "Next" to see the license agreement. (Ha ha only serious.)
-
RE: War on right clickers, tides have turned!
The most hilarious part of the site, to me, is still the Asian woman in the banner. What's she doing there? Is she smiling because she can't copy my content? Maybe she's smiling because she knows how to turn off Javascript. And also how, an inch below, there's a shitty low-quality picture of the author in contrast with ultra-quality Clip Art Woman who can't get my content. She wants it, but she can't have it. And in defeat, she just smiles at my ingenuity. I'm glad I bought Right Click Revenue - now Asian women will stare at me all the time.
(Not 30 seconds after writing this, I couldn't figure out why I wasn't able to vote on the thread.)
-
RE: Visual Studio 2005 WTF indeed....
This happens all the time in ASP.NET when you do something the web forms designer doesn't like, such as not inheriting directly from System.Web.UI.Page. The web forms designer uses the attribute metadata to support the web forms designer, and attributes aren't inherited, so when you don't inherit from System.Web.UI.Page directly you lose designer support.
The underlying WTF is the .NET platform. The platform designers missed the whole class on "why inheritance is useful" and invented vital class metadata that can't be inherited or directly copied.
-
RE: Game Loops
I remember being impressed with Ada because you could write an infinite loop without a faked up condition. The idea being that in Ada the typical infinite loop would normally be terminated by detonation.
--Larry Wall -
RE: More Network Admin Gold
@dcardani said:
His response was, "It's possible to program a Mac?"
I will treasure this forever. Thank you.
-
RE: Ya gotta love headhunters & hiring managers
@JvdL said:
So what's your point? It works as specified both in JS as well in Python.Take a couple of hours to read the specs, before bashing a language you don't know.And if I had a dime for every time they think "Python == JavaScript"...You might think so, but I'm looking at where this seems to be specified in the ECMAScript spec and I don't see how it indicates the difference. I've been into the specs before (on a scoping issue).
Consider the cases of calling "(a.method)()" and "(b = a.method)()". Check section 11.2.3 of the ECMAScript spec and explain what each one should do according to the specification. (Good luck.)
-
RE: Run - the microsoft killer is coming!!!1
It looks like it's still pretty far away, I think we're okay.
-
RE: Ya gotta love headhunters & hiring managers
@nixen said:
@quamaretto said:
Miniature golf on the moon, with chainsaws maybe. Javascript is a pretty odd beast when you get up close. Consider the difference between "var x = a.bar()" and "var f = a.bar; x = f()". Works in Python, not in Javascript, and a weird little bit of magic is the cause.
Actually, I'm pretty sure that does work in javascript - and I think most of the people dissing javascript would be somewhat surprised if they took the time to actually know the language..
Let me clarify; I typed the last bit pretty fast and left out [i]most[/i] of the explanation.
In Python, doing "f = a.bar" will set 'f' to a bound method, if bar is a method. This means that "f()" essentially means "a.bar()" - equivalent to a method call.In Javascript, "f = a.bar" will assign 'f' to the function contained in a.bar, but will [i]not[/i] create a bound method, even if the function in a.bar is intended to be called as a method and contains references to 'this'. So 'f()' is just a call to a function, using the global object (I think) as 'this' inside the function.
A method is only a direct call to a property on an object. It's a weird bit of syntax, but that's how it is.
Try it; you can stick this whole thing in the Firefox Error Console (under Tools) if running Firefox. The first alert is 42, the second is GLOBAL!
member = 'GLOBAL!'; a = { member: 42, method: function(){ alert(this.member) } }; a.method(); f = a.method; f();
I'm 90% certain that Python is the opposite (you get a bound method), but it's been awhile since I messed with it.(Sorry for jacking your thread, man.)
-
RE: Too lazy to use my scanner
The real WTF is all the extra exclamation points at the end. Victor Borge is turning in his grave at the thought -
"fsssst pppt fsssst ppppt fsssssssssssscrewit. NEGINEGI!"
-
RE: Dear dummy,
It sure sounds like it's ISO or ECMA or something like that...
-
RE: Ya gotta love headhunters & hiring managers
@VGR said:
@asuffield said:
@AssimilatedByBorg said:
That's when I tell them that the only thing in common between Java and JavaScript is the 1st 4 letters of their names.
I prefer "Java and JavaScript are about as similar as Java and iced tea. They both pour, but that's about where it ends."
I like to say that Java is to Javascript as golf is to miniature golf.
Miniature golf on the moon, with chainsaws maybe. Javascript is a pretty odd beast when you get up close. Consider the difference between "var x = a.bar()" and "var f = a.bar; x = f()". Works in Python, not in Javascript, and a weird little bit of magic is the cause.
-
RE: Ya gotta love headhunters & hiring managers
@HeadHunterHater said:
3. A third place is looking for a server-side architect. I breeze through the first four interviewers. Then the junior guy comes in to tech me out. He draws some scenario on a board and asks me how I'd handle it. I answer. He asks for another solution. Can you see it coming? I give another solution. He asks if there's another way to do it. I think for a second and offer yet a 3rd solution. He tells me he's thinking of a different solution. I look at him and tell him that I'm not Carnac, and then get up and walk out. On the way out the door, I tell the hiring manager what happened. Since he liked me, he asks me to stay anyway. I thought for a second and decided that I didn't want to work for someone who thought it appropriate to have someone one year out of school, and absolutely no clue how to conduct an interview, try to tech out someone so much more senior.
I always have a hard time understanding what's wrong with this kind of situation, because the lack of tact just isn't a good reason to leave.
They want to determine whether you are competent in some area, and they know he is. So they have him test you. He does it in a way that is irritating. There isn't a bigger problem than that here. You apparently don't want a good job because of their respect for competence.
-
RE: IDictionarys Are Very Valuable
I did figure out the meaning soon after and, as you saw, MSDN was not much help. However, the MSDN example is part of a larger example which only implements Select. So, they carved it up, exceptions and all, into the individual examples...
I'm in the middle of a project to write a "generalized" solution for managing table data with no special fields. Beware of assignments to "generalize" something, as managers will not allocate enough time to complete them, no matter what.
-
IDictionarys Are Very Valuable
I found this bit of joy when I went to override a method in ASP.NET:
protected override int ExecuteUpdate(IDictionary keys, IDictionary values, IDictionary oldValues)
Call me behind the times, but I would have thought... uh... That the keys and values were both held in a dictionary...
Oh well. I suppose this means something sensible, but I'll be damned if I know what it is at first glance.
-
RE: Facebook (+1 informative)
Facebook itself is a massive, distributed WTF... I have a rant about it in facebook, but I'm not sure whether any of you would be allowed to view it, or whether I could even MAKE it available to you, for my own safety.
For instance, the Wall, THE WALL, the #1 chitchat feature of facebook, simply is not on any menu or even HINTED at on any menu. I hope my MOM can figure out that to communicate with people, she needs to go to Profile and then scroll way down. Not to mention that they refuse to use any font size larger than 10 pt, for anything, no matter how important, so mom probably won't even find the menu.
Want to send a message to someone? Maybe you could use the link to someone's wall, or you could use "Wall-to-Wall" which... is ALSO for writing on someone else's wall...
There is a private message system, so you can COMPOSE a message, but only by first going to INBOX... Why would I be going to INBOX to create OUTGOING mail?
-
RE: Airbus A380 - press WTF?
@obediah said:
But if the 747 flies faster, does the 747 turtle the A380?
No, but you could say, "The bully began kicking him, so Timmy turtled to defend himself"
What good is a language, if you can't have some fun with it?
Verbing weirds language.
-
RE: Beautiful SharePoint
Yeah.
Here's a bit about sharepoint I love:
- You can completely re-arrange the contents of the front page to suite your personal needs. They even provide drag-and-drop.
- The whole site is skinned and the skin can be changed so that you can get a higher contrast look than the default.
- But only site wide. Yes, allowing individuals to select their own skin was too much work, unlike using active, drag-and-drop components to completely customize the contents.
WTF?
Also, sharepoint - yea, even unto a certain past version, if I heard right - must be installed to install Team Foundation Server. (That's secondhand knowledge.)
Good complaints come in threes - My manager decided that we should use Sharepoint for Issue Tracking. This is great, because now there's an explicit log of issues going to the Use Case person, the Testing person, me, the data people, and the PM... Unfortunately, the PM insists that all issues must be assigned to him, first. And then he will assign them to the correct person, after looking over them. I don't think he got the Share point of Sharepoint. It's not Centralizepoint or Hogpoint, man. :(
-
RE: Don't believe everything you read in the papers. . .
@flaquito said:
And is it just me, or does that guy on the right look a bit like Ben Stein?
"Win Ben Stein's Warp Drive!"
-
RE: Origins of WTF coders
You can view the "class materials" directly in the download section...
It just isn't possible to tell what the code is supposed to do.
It's on the web page for the course that you must comment every loop and function, but his code... Well, his code must just be self-documenting, I guess.
Oh, wait. All C++ professors pull that shit. My bad.
-
RE: No comment
@fennec said:
Ack. Do people here know about 'return'? And what's with the labels? :(
'return' is for people obsessed with C. :)
Those of use who write any or all of Perl, Ruby, Lisp, Haskell, ML, erlang or Perl are used to doing it the other way. Perl actually has some nice functional features to complement... Well, to complement the ultra-procedural features like all the things that operate on $_ by default.
Furthermore, it's a performance defeat in Perl and Ruby to do "return" instead of a default last value in a tight loop. I've had to optimize this out in the Computer Language Shootout, in both languages.
It always irks me that the cardinal demonstration of continuations in Scheme is to have a "return" statement by making the code twice as long. >:|
But yeah, I would have if'd out that whole section rather than using GOTO. Some people will go to great lengths to use the end-of-statement form of 'if'.
-
Or else!
Thank you for that suggestion, Intellisense. Any suggestions on what comes after "else"?
Honestly, I knew that it just shows you all the keywords, but I saw this and the point was driven home.
-
RE: MOOcode WTF
I've written MUSH code and MUCK code, but I can say I never generated a giant hardcoded list like this. Well... Not often. You can do some very interesting crap with it, and if you're a good programmer you can occasionally get the wizards to say "Ooh, how did you do that?" Like getting a pet object to "see" you leave the room and follow you, or come if you yell in an adjacent room, or respond creatively to spoken commands... These things are deceptively hard in MUSH, for one, partly because the language is structured around preventing certain disruptive hacks and partly because it's a strapped on half-Lisp, half Tcl for a giant object world with a constant number of slots per object.
-
RE: No comment
I'd be tempted to write the original as
sub whatever {
"0" x (7 - (log($_[1])/log(10))) . $_[1]}
But then, it would probably be easier on the maintainer to use printf instead...
Also, what happened to the first argument? My best guess is that the call was going to contain the max number of digits, but that was scrapped and they didn't feel like changing the calls... :)
-
RE: A New Person Programming
Damn you, reply timeout! Here's an outside (sortof) opinion I could live with.
-
RE: A New Person Programming
@Hitsuji said:
@jrwr00 said:
I want to learn a programming language, but i don't know where to start, now i do like PHP and i've fiddled around with it, any ones out there NOT for websites,
I think this question has come up so much that it's almost time to start an FAQ
What would it say?
"Your could choose Perl, Python, Ruby, PHP, C, C++, C#, Java, Scheme, Visual Basic, x86 assembler, MIPS assembler, Delphi, or Smalltalk, but those choices are all wrong for some reason."
-
RE: When your boss edits your SQL...
@Edgesmash said:
Still, it was annoying when a client testing the software called me, asking why he didn't have access to any offices.
And I wondered why the new managers here wanted to set up four separate environments (Dev, test, qa, production). It's because they reserve the right to screw up the Dev stuff at any time without telling me...
-
RE: Please tell me I don't need to learn this.
I took classes at Ivy Tech in Indiana for some time in my high school years. (Is that the school you're talking about?)
Maybe maintenance programming of mainframes (or simple VB and Java apps) is the easiest job market to target for them. It makes some sense - You just learn that one language and you can get into a niche market that will still be around 10 or 20 years. The language itself is easy so that students with less potential or little time and money can 'learn' them quickly and get niche jobs, and there are plenty of retired or retiring old farts willing to teach it.
I still remember my flowcharting class. Bleh. The best class I had there was probably the VB class. Wow, you can just make it do shit.
-
RE: Windows Vista Ultimate Edition Pricing WTF
@TheJasper said:
However, I think this 'fair review' reads like either a commercial or fan-fiction.
The line that stuck out to me was "Do not purchase or use Windows Vista Home Basic." I think a true fanboy would have said something like, "Home Basic doesn't have all of the fancy UI features, but it comes with Microsoft's new beefed up security!" or some crap like that to justify all the product editions. I would say it isn't too bad, for a review of Microsoft's baby on a Windows enthusiast site.
Others:
"And Mac advocates can claim, truthfully, that many of Vista's best features appeared first on Mac OS X, sometimes years ago. More problematic, over the past five years, many of Windows Vista's best features have been jettisoned, and it's unclear whether they'll ever appear in future Windows versions."
(Hmm... Does anyone know what "Premium Games" is? Sounds like "Pinball" to me.) -
RE: The richness of language
Looks like you aren't trying to eliminate all invalid email addresses, nor support all valid ones (! paths) .
Under the circumstances, I would have just used "/^.+\@.+\..+$/". Leaves a bit to be desired, but stops the idiots who think gmail.com is an e-mail address. You also don't have to change it when there are new TLDs. :)
(Reminds me, I just did the TEST problem in Sphere Online Judge with a regex. Overkill, no? The solution was "awk -e '/^42$/{exit}{print}'".)
-
RE: Twilight Zone Efficency Model
Not likely, I am the one and only programmer here with a PM and a BA. Everyone else is still in sane-land.
The only way you could be working here is if you're actually me... OH SHI-
TIME PARADOX.
-
RE: Modern compiled language? Good GUI toolkit?
Here's an interesting suggestion: Start by learning C# 2.0, then move to F# once you're familiar with the platform. If you want a high performance, learn OCaml afterwards, since F# is based on it and it has quite high performance (But only when used correctly, like everything else). F# is not well-known itself, but for an unpopular language, it has been developed quite well by the Microsoft Research team.
The obvious alternatives to C# and Java in the "fast, modern language" category are mostly functional - there are a few (Scala, Nemerle, F#, etc.) for the major VM platforms, and a few major ones - Haskell and OCaml, mainly - that allow native development for each platform.
A distant third option is to learn some scripting language with a cross-platform GUI and close ties to C or C++ (Ruby, Tcl, lua, etc.)
And if you're totally crazy and want to lose your mind, there's also J.
-
RE: Hi! I'm your Oracle DBA.
My cousin who works there told my this, but I could be misremembering. He was working on the "Used and new" marketplace thingy.
-
RE: M$ Refresh Epilepsy
I was trying to find that page through the site's menu system... I didn't immediately find it, but did find this.
http://www.microsoft.com/learning/mcp/offers/insurance/default.mspx
Exam insurance. If you can't pass an MCP Exam the first time, you can be assured of a second chance... for a price.
I can't put my finger on what's wrong with this.
-
RE: Twilight Zone Efficency Model
You aren't allowed to cry. If you need someone to cry, submit an issue to the PM and he'll assign it to the BA, and they will cry for you if the review meeting goes well.
(I love how this sort of process prevents the slightest screwup in requirements, but no one gives a shit about SQL injection attacks. That's low level work, man. It's not part of the process.)
-
RE: The Helpful MSDN
Also, up until recently, the search sucked so bad that I simply couldn't use it and had to Google the MSDN site instead. Searching for Web.config would not bring up the web configuration file format even in the first few pages, and looking for anything uncommon was totally hopeless.
-
RE: Scrabble
My dad plays online Scrabble. I'm pretty sure I've heard "deafens" from him before in some list. I think the six letters d,e,e,a,n,s or maybe e,e,a,f,n,s form one of the choice "roots" or "stems" or whatever they're called.
-
The Helpful MSDN
"This interface is implemented by the DataView class. Implementation of a method should exhibit the same behavior as the implementation of that method in the DataView class." --http://msdn2.microsoft.com/en-us/library/system.componentmodel.ibindinglist.aspx
Every time I think I haven't quite gotten OO, I look to Microsoft to assure me that I'm not behind the curve. "The implementation of this interface should mimic the class we implement it with." Thank you. Where can I find the source for that so I don't miss some detail?
-
RE: Switch me harder
This guy must have seen Duff's Device and thought, "Hmm... I guess it's common practice..."
http://en.wikipedia.org/wiki/Duff's_device
-
RE: Server-side Javascript
Personally, I love the Javascript language... The way prototypes are set up, you can do OO metaprogramming just as in Ruby. You could do an ActiveRecord-style ORM easily with a good database API.
I haven't actually messed with JScript.NET. Everything is C# here, and messing with a useful language will only make me wistful.
-
RE: The end of Google
My cousin "works" for this place. He's still provisional as of last I talked to him, so he gets no money. It sounded quite a bit hokey and broken when he described it. Good to know that it also doesn't support about 10% of users, maybe more. XD
-
RE: Everquest, testing, and customers
The third WTF is that you think they care enough about their reputation to make sure no one finds out they don't always have the customer's best interests in mind. That's a bit like posting an article linking fascism to mass murder and then accidentally putting Na...
Oh, shit, Godwin's law. Does that count?
-
RE: Sony PS3 WTF
What's the practical difference advertising or not advertising something you don't have? I would mostly assume that this is because the stores know there just won't be enough profit in advertising the scant few they do get.
-
RE: The Rube Goldberg Integration
I don't get it. Are you saying that XML is a bad format?
The real WTF is using stored procedures, which should be replaced by quick Perl scripts on the application server.