|
GrumpyDoctor posted:Then you'll love Boost MPL That's pretty cool but lacks the wonderful fun of compile time prime factorization
|
# ? Apr 29, 2010 03:06 |
|
|
# ? May 16, 2024 18:03 |
|
Sorry, but Boost.Units is goddamn sweet.
|
# ? Apr 29, 2010 04:27 |
|
One of my proudest moments at work was talking a good programmer out of building unit conversion into our research platform. That is one of the most painful and unending things you can do. And you ain't gunna get paid for it later.
|
# ? Apr 29, 2010 05:48 |
|
Seems like this should go here: http://arstechnica.com/software/news/2010/04/developers-apparently-love-net-hate-mfc-ruby-on-rails.ars quote:the results themsevels are surprising—in particular, the poor showing by Ruby on Rails. ... The framework was criticised particularly in the area of community support. 'See, the rails community is so much better than you that we simply can't be bothered with your pathetic little survey.'
|
# ? Apr 29, 2010 15:58 |
|
Well, given that the report included MFC and Win32 in a list of web frameworks...
|
# ? Apr 29, 2010 18:32 |
|
Munkeymon posted:Seems like this should go here: I never quite understood why most rails developers acted like complete and utter douchebags. I went to a technology conference last year, aside from Microsoft / IBM / Sun, it was a big ruby on rails circle jerk. Ruby on Rails will be the death of .Net and Java! Python/C++ will die too why would anybody use that! Now everybody drink your koolaid. Sadily i think everybody drank the ruby koolaid. As a result i got to have dinner and chat with some lonely microsoft / sun guys. Ironically i checked up on those companies promoting ruby and majority of them have yet to release anything.
|
# ? Apr 29, 2010 18:37 |
|
Ryouga Inverse posted:Well, given that the report included MFC and Win32 in a list of web frameworks... No it didn't? It's "frameworks", period.
|
# ? Apr 29, 2010 19:29 |
|
Avenging Dentist posted:No it didn't? It's "frameworks", period. The report posted:The frameworks included in this user satisfaction survey are: "Frameworks, period" would include Cocoa/Carbon, Qt, GTK, etc. This thing has no idea what it wants to focus on.
|
# ? Apr 29, 2010 19:50 |
|
Ryouga Inverse posted:Three of these things aren't like the others. Not to mention that the company that conducted the survey is charging $595 to view the results.
|
# ? Apr 29, 2010 20:04 |
|
Ryouga Inverse posted:Three of these things aren't like the others. The selection of, uh, 'frameworks' was odd to be sure, but I loved how the parts about RoR community are just so loving perfect. 'The Rails community is full of assholes' "Yeah, that's 'cuz we're better than you could ever hope to be. Now watch me ignore this guy's question and mock him for not using operator precedence to remove some of the grouping operators in the irrelevant part of his example code "
|
# ? Apr 29, 2010 20:05 |
|
Ryouga Inverse posted:Three of these things aren't like the others. Wow, a Windows-centric developer survey? Well I never.
|
# ? Apr 29, 2010 20:18 |
|
UberJumper posted:I never quite understood why most rails developers acted like complete and utter douchebags. I went to a technology conference last year, aside from Microsoft / IBM / Sun, it was a big ruby on rails circle jerk.
|
# ? Apr 30, 2010 00:05 |
|
Mac OS X supports "frameworks", which are just a directory/bundle that contains a dynamic library and associated resources (header files, images, and what have you). The iPhone doesn't support creating custom frameworks -- you can only build static libraries. But I wanted to be able to embed a resource (an HTML file) into my .a file and refer to it from within classes in the library. That meant writing a build step in my project that would take the file, run hexdump on it, and dump the bytes into a .c file formatted as hex character literals: code:
The first pipe to sed is to get rid of the extra columns in the last row if the file length isn't a multiple of 8. The second pipe to sed would be unnecessary if I could figure out how to get the hexdump format string to output "\x" correctly, so instead I had to make it output like 'x00' and then use sed to insert the backslash. Whenever I tried to put the backslash in the hexdump -e argument, black magic would cause it to always output two backslashes. Whatever, it works this way and I'll never have to touch it again.
|
# ? May 10, 2010 19:05 |
|
Flobbster posted:what the gently caress? Why not use a real language? code:
|
# ? May 10, 2010 21:44 |
|
Flobbster posted:
This is exactly the sort of trash Perl and Ruby were made to replace loving come on mang
|
# ? May 10, 2010 22:30 |
|
Flobbster posted:Whatever, it works this way and I'll never have to touch it again. If you managed to type that sentence without great big warning alarms going off in your head, you have no foresight at all.
|
# ? May 10, 2010 23:58 |
|
Zhentar posted:If you managed to type that sentence without great big warning alarms going off in your head, you have no foresight at all. Oh, I don't actually believe that, I just don't care enough to change it right now. I've got bigger fish to fry, and this is a hobby project anyway.
|
# ? May 11, 2010 00:10 |
|
code:
|
# ? May 11, 2010 01:44 |
|
Flobbster posted:Oh, I don't actually believe that, I just don't care enough to change it right now. I've got bigger fish to fry, and this is a hobby project anyway. Just bookmark Janin's post for when you need to change it.
|
# ? May 11, 2010 08:31 |
|
I just found this in a project i'm maintaining:php:<?php {...} //TODO: wtf? $action = $this->getRequest()->getParam('ADD',null) == null ? $this->getRequest()->getParam('SEARCH',null) == null ? $this->getRequest()->getParam('DELETE',null) == "X" ? 'DELETE' : null : 'SEARCH' : 'ADD'; {...} ?>
|
# ? May 12, 2010 09:29 |
|
Arrgh, nm...
|
# ? May 12, 2010 09:48 |
|
at0mic.c0w posted:
You know what the worst part is? $this.
|
# ? May 12, 2010 13:32 |
|
Ari posted:You know what the worst part is? $this. I don't think your posting is that bad.
|
# ? May 12, 2010 14:10 |
|
Ari posted:You know what the worst part is? $this. What's wrong with $this?
|
# ? May 12, 2010 19:09 |
|
// TODO: wtf? is my favorite. Though that is the worst abuse of the ternary operator I have ever seen.
|
# ? May 12, 2010 19:11 |
|
Ryouga Inverse posted:// TODO: wtf? is my favorite. For one of my online homework questions in my intro to programming course for c++, one of the questions was: " Assume that day is an int variable whose value is 1 or 2 or ... or 7. Write an expression whose value is "sun" or "mon" or ... or "sat" based on the value of day. (So, if the value of day were 4 then the value of the expression would be "wed".)." The only acceptable solutions? TuringsCraft posted:CORRECT SUBMISSION 1 (70%, 42 submissions): Now none of my classmates use the ternary operator anymore. What a terrible example.
|
# ? May 13, 2010 02:07 |
|
An Outland Dish posted:For one of my online homework questions in my intro to programming course for c++, one of the questions was: char* day_lut[8]; day_lut[1]='sun'; day_lut[2]='mon'; ... day_lut[7]='sat'; and then day_lut[day]; with no checking to see if day is a valid number Why yes, there was tons of code like this at the place I was contracted to code for. On a better note, while that is a terrible example for the ternary operator just take comfort in the fact it could have been worse. Just look at the example you responded to. Khorne fucked around with this message at 05:21 on May 13, 2010 |
# ? May 13, 2010 02:39 |
|
An Outland Dish posted:For one of my online homework questions in my intro to programming course for c++, one of the questions was: code:
|
# ? May 13, 2010 03:53 |
|
Khorne posted:Why yes, there was tons of code like this at the place I was contracted to code for. On a better note, while that is a terrible example for the ternary operator just take comfort in the fact it could have been worse. Your example is a clamp/assertion away from being the "right way" in C. Perhaps it is you who is the horror, goon sir?
|
# ? May 13, 2010 03:59 |
|
Avenging Dentist posted:Your example is a clamp/assertion away from being the "right way" in C. Perhaps it is you who is the horror, goon sir? I personally use "that way" when I do things in C. I've even done it in scripting languages because the difference is often non-existent. The horror is when there are multiple arrays defined for the same purpose, using commonly used variable names/names that make no sense, no checking if the value is within bounds (especially when invalid values can and will be passed from time to time), and using it for everything including avoiding a simple if->else construct for two numerical values that aren't referenced anywhere else. The look up table array thing is great when you have numbers assigned to strings and it gets referenced often or used in multiple functions/places, but it's really not great when you are just using it as a lazy one-off else-if and don't implement it properly. You know all of this, but I have to defend my C coding honor. Khorne fucked around with this message at 05:27 on May 13, 2010 |
# ? May 13, 2010 05:15 |
|
code:
|
# ? May 13, 2010 12:29 |
|
TagUrIt posted:
fmod() is deep magic, it can't be trusted. I actually did something almost exactly like that a few days ago: code:
ymgve fucked around with this message at 15:31 on May 13, 2010 |
# ? May 13, 2010 15:29 |
|
An entire class where the only comment is code:
|
# ? May 13, 2010 16:50 |
|
clockwork automaton posted:An entire class where the only comment is
|
# ? May 13, 2010 17:54 |
|
I just reverted a developer's ASCII art figlet comments from an 800+ line HTML/JS mishmash. I assume he put them in because it was too hard for him to find the code he needed to modify. Is it too late in the evening to start drinking? Edit: I don't think he even used figlet. He could at least have chosen a decent font. manero fucked around with this message at 05:07 on May 14, 2010 |
# ? May 14, 2010 04:51 |
|
manero posted:I just reverted a developer's ASCII art figlet comments from an 800+ line HTML/JS mishmash. I assume he put them in because it was too hard for him to find the code he needed to modify. Spoilsport
|
# ? May 14, 2010 05:22 |
|
TagUrIt posted:
ymgve posted:
|
# ? May 14, 2010 06:12 |
|
TagUrIt posted:
Wait wtf, after seeing the loops I missed the real horror of the return line...
|
# ? May 14, 2010 15:42 |
|
Ugg boots posted:Wait wtf, after seeing the loops I missed the real horror of the return line... Hahahaha I just saw that right now.
|
# ? May 14, 2010 15:47 |
|
|
# ? May 16, 2024 18:03 |
|
Ugg boots posted:Wait wtf, after seeing the loops I missed the real horror of the return line... Is there any conceivable reason why you might think that was in any way sensible? Some standard return format or something?
|
# ? May 14, 2010 15:49 |