|
YOSPOS is bad. So, uh, are coding horrors? The likes of which I have not personally posted in a long time.
|
# ? Mar 12, 2014 02:59 |
|
|
# ? May 21, 2024 07:49 |
|
code:
|
# ? Mar 12, 2014 03:07 |
|
Clearly ms is short for mibiseconds.
|
# ? Mar 12, 2014 03:15 |
|
Westie posted:I was going to empty quote but then I remembered what forum I'm on. You're chickening out?
|
# ? Mar 12, 2014 03:31 |
|
Notorious QIG posted:Yospos best pos.
|
# ? Mar 12, 2014 03:31 |
|
Now you've done it.
|
# ? Mar 12, 2014 03:36 |
|
Reformed Pissboy posted:YOSPOS is bad. Nope.
|
# ? Mar 12, 2014 04:10 |
|
A contractor is supposed to push something up for my team to review. I'm sure there's a horror in it, but I can't tell you what it is because he can't figure out how to push changes with mercurial. How do these people get past interviews? What is this guy working on?
|
# ? Mar 12, 2014 04:27 |
|
leper khan posted:A contractor is supposed to push something up for my team to review. I'm sure there's a horror in it, but I can't tell you what it is because he can't figure out how to push changes with mercurial. Apparently he's working on how to push something for your team to review
|
# ? Mar 12, 2014 04:40 |
|
leper khan posted:A contractor is supposed to push something up for my team to review. I'm sure there's a horror in it, but I can't tell you what it is because he can't figure out how to push changes with mercurial. Ah yeah, there's always one; typically an older gentleman, but sometimes a youthful pothead and/or aspiring empty suit. In their final form, they will actively turn any assignments into lots of work for other people while laughing at those who are productive. I have a more benign version on my team right now. They hunt and peck at the speed of a hibernating bear, they regularly perform 1/10 to 1/5 the work of the other team members, and they spend most of their time "learning" on Youtube. I'm going to get them fired soon, but I unfortunately can't do it directly. People like that get hired for a couple of reasons, either they didn't start out that way and just slowly devolved, or they came across as thoughtful and competent (if a bit slow) in the interview. A person who knows and can explain FizzBuzz and some tree traversal can get hired and then you find out that they need 2 weeks to learn mercurial.
|
# ? Mar 12, 2014 05:08 |
|
Kilson posted:Or maybe I'm just jaded by having to look at Asterisk's source code all the time. This is way back but... code:
|
# ? Mar 12, 2014 17:24 |
|
shrughes posted:
This is a work of art.
|
# ? Mar 12, 2014 17:26 |
|
shrughes posted:
Wow, a kilo-millisecond.
|
# ? Mar 12, 2014 17:31 |
|
shrughes posted:
glorious
|
# ? Mar 12, 2014 17:34 |
|
SI integer: a whole number, possibly containing a suffix denoting the base unit of the value. Accepted suffixes are 'k', 'M', 'G', 'T', and 'P', denoting kilo (1024), mega (1024^2), giga (1024^3), tera (1024^4), and peta (1024^5) respectively. The suffix is not case sensitive. If prefixed with '0x', the value is assumed to be base 16 (hexadecimal). A suffix may include a trailing 'b', for instance 'kb' is identical to 'k'. You can specify a base 10 value by using 'KiB', 'MiB', 'GiB', etc. This is useful for disk drives where values are often given in base 10 values. Specifying '30GiB' will get you 30*1000^3 bytes.
|
# ? Mar 12, 2014 18:15 |
|
If you want a 10 bit shift just ask for a 10 bit shift.
|
# ? Mar 12, 2014 18:19 |
|
The assumption that the compiler would apply strength reduction to turn a multiplication by 1024 into a left shift by 10 irks me less than the assumption that integer multiplication is some expensive operation. The latency for imul or mul is what, 3 cycles?
|
# ? Mar 12, 2014 18:49 |
|
Wait, you have a hardware multiplier? That can operate on registers??
|
# ? Mar 12, 2014 18:55 |
|
JawnV6 posted:Wait, you have a hardware multiplier? That can operate on registers?? I'm gonna embed a hardware multiplier up your rear end if you keep sassin people, boy!
|
# ? Mar 13, 2014 04:42 |
|
JawnV6 posted:Wait, you have a hardware multiplier? That can operate on registers??
|
# ? Mar 13, 2014 14:17 |
|
PICs are pretty common (unfortunately), and the low-end 12-bit PICs don't have hardware multipliers AFAIK.
|
# ? Mar 13, 2014 15:57 |
|
PrBacterio posted:Is there even an architecture out there in common use anymore, no matter how small and embedded you go, that doesn't? Even the Atmel stuff has a multiply instruction, doesn't it? Atmel what? Atmel sells everything from beefy 120MHz Cortex M4's with 65k gates including a full FPU down to 8-bit AVR's in the ~10k gate range. Down towards the lower end the hardware multipliers get scarcer and with qualifications like 8-bit only or memory-mapped. For a lot of 'sensor glue' type applications you don't really need to multiply anyway. TI's MSP430 is another line where hardware multipliers are available, but not common.
|
# ? Mar 13, 2014 18:05 |
|
My dad works with an ancient CPU that does have a multiply instruction, but it can use too many cycles depending on input so he ended up writing his own multiply function that can be a little inaccurate but always executes in a known number of cycles. There is a horror here - the only device that works with his kit relies on some unmaintained DOS software that won't run on an NT kernel, so he runs a Windows 98 box which hosts his dev. environment. Brings me out in cold sweats whenever he talks about it.
|
# ? Mar 13, 2014 18:17 |
|
Dren posted:I thought they were on the stack. Generally speaking they're in a read-only section of the executable file (e.g. .rodata in ELF on Linux, .rdata in PE/COFF on Windows) that is mapped into the process's address space just like the executable code is. So definitely not on the stack, not technically on the heap either, guaranteed to stick around until the process/DLL is unloaded.
|
# ? Mar 13, 2014 19:07 |
|
code:
|
# ? Mar 13, 2014 22:58 |
|
..btt posted:My dad works with an ancient CPU that does have a multiply instruction, but it can use too many cycles depending on input so he ended up writing his own multiply function that can be a little inaccurate but always executes in a known number of cycles. What's this use case where you can tolerate occasionally incorrect multiplication as long as you know exactly how long it will take?
|
# ? Mar 14, 2014 01:32 |
|
Smugdog Millionaire posted:What's this use case where you can tolerate occasionally incorrect multiplication as long as you know exactly how long it will take?
|
# ? Mar 14, 2014 01:36 |
|
Smugdog Millionaire posted:What's this use case where you can tolerate occasionally incorrect multiplication as long as you know exactly how long it will take? Upstream of a Pentium
|
# ? Mar 14, 2014 01:37 |
|
DotFortune posted:
so what? I mean it could just be $('<div class="overlay"><div class="inner"></div></div>') but on the scale of web dev horrors this is nothing.
|
# ? Mar 14, 2014 02:19 |
|
I'm trying to fix code in the VLC Windows 8 port (which, if you have not tried it, is an awful mess) when I saw this view model. I kept getting null exception errors in "GetCover()", where it would tried to get the album art of a music file. This code is hit when it can't get the thumbnail from the file.code:
Also, "xml1.Root.Descendants("image").ElementAt(3);" is a "large" image in the LastFM Api. Their logic is that if it can't find that element, it would remain null and then continue. The problem is that it throws an error. Now, because of the try catch, it just continues after that, but there is no reason to be doing this at all. Also, if LastFM does not have a "large" image, but does have the other sizes, they would be ignored. Also, you can see "fileName". This is used to set the filename for the thumbnail to be stored as. Filename is set as such: code:
|
# ? Mar 14, 2014 02:31 |
|
php:<? function output_line(){ global $schema, $charges,$last_invoice_row,$last_shipment_row, $total_charges, $carrier,$comma_pipe,$table_storage; ?> The extra-extra-extra fun part? The poo poo that calls this uses an extract() on a gigantic array that may or may not contain some of these values. Fan. loving. Tastic. Bonus: php:<? //var_dump($last_invoice_row); //var_dump($last_shipment_row); // print_r($charges); // print_r($total_charges); exit(1); ?> IT BEGINS fucked around with this message at 14:30 on Mar 14, 2014 |
# ? Mar 14, 2014 14:25 |
|
Tell this person to at least use Kint. https://github.com/raveren/kint/
|
# ? Mar 14, 2014 16:09 |
|
Drastic Actions posted:VLC horrors I just went to take a look and thought "Oh good they have unit tests". code:
|
# ? Mar 14, 2014 17:14 |
Checks out for me!
|
|
# ? Mar 14, 2014 21:05 |
|
Ithaqua posted:I just went to take a look and thought "Oh good they have unit tests". I'm actually sending patches now to help fix this stuff. Unit tests are on the to-do list. It's too crashy for them to be useful right now .
|
# ? Mar 14, 2014 21:17 |
|
Ithaqua posted:I just went to take a look and thought "Oh good they have unit tests". At least they pass.
|
# ? Mar 14, 2014 21:54 |
|
Do they? I think they are inconclusive.
|
# ? Mar 14, 2014 23:38 |
|
Just in case you ever wanted a new way to write the number 0:code:
|
# ? Mar 17, 2014 01:17 |
|
computational physics posted:
At least it's not Fortran?
|
# ? Mar 17, 2014 01:39 |
|
|
# ? May 21, 2024 07:49 |
|
More VLC stuffcode:
In other words, when you leave the VLC app, it stops being VLC. Windows has now taken control of the stream. EDIT: I lied. It's actually using the VLC stream still. You can trick Windows 8 to play background audio if you already have audio running and play something on the media element stream. So they play the same audio file turned down so you can hear their stream. gently caress this. Once again Drastic Actions fucked around with this message at 03:15 on Mar 17, 2014 |
# ? Mar 17, 2014 02:50 |