|
Superschaf posted:This is a really important part. Writing out the What and (more importantly) the Why, forces you to sanity-check your own changes. That helped me a lot to improve as a programmer. And sometimes while trying to explain Why I realize that the change I just made is completely loving retarded and I should be doing something different. Lurchington posted:I find it surprising that JavaScript has a syntax error for 'butts' ++ 'dongs', and has a coercion in 'butts' + + 'dongs' i ++ and i + + being parsed differently is true in a very large number of languages.
|
# ? Sep 10, 2013 00:38 |
|
|
# ? Jun 7, 2024 06:09 |
|
Lurchington posted:I find it surprising that JavaScript has a syntax error for 'butts' ++ 'dongs', and has a coercion in 'butts' + + 'dongs' C gives you an error for 2 ++ 3 (in this case, saying you can't increment a non-lvalue) and succeeds on 2 + + 3.
|
# ? Sep 10, 2013 00:39 |
|
The point being made is that the way basically every other language parses "2" + + "3" is as "2" + (+"3") whereupon it does the right thing (most likely complain that unary + can't take a string) whereas JavaScript apparently parses it as "2" + (null + "3") - null + "3" equals null, then "2" + null coerces null into a string and appends it to "2". It's the PHP "given the choice between failing and doing something nonsensical, do something nonsensical" mentality.
|
# ? Sep 10, 2013 01:23 |
|
Crosscontaminant posted:The point being made is that the way basically every other language parses "2" + + "3" is as "2" + (+"3") whereupon it does the right thing (most likely complain that unary + can't take a string) whereas JavaScript apparently parses it as "2" + (null + "3") - null + "3" equals null, then "2" + null coerces null into a string and appends it to "2". It's the PHP "given the choice between failing and doing something nonsensical, do something nonsensical" mentality. code:
Sedro fucked around with this message at 01:37 on Sep 10, 2013 |
# ? Sep 10, 2013 01:34 |
|
Crosscontaminant posted:The point being made is that the way basically every other language parses "2" + + "3" is as "2" + (+"3") whereupon it does the right thing (most likely complain that unary + can't take a string) whereas JavaScript apparently parses it as "2" + (null + "3") - null + "3" equals null, then "2" + null coerces null into a string and appends it to "2". It's the PHP "given the choice between failing and doing something nonsensical, do something nonsensical" mentality. What? No, nothing in this post is correct. code:
|
# ? Sep 10, 2013 01:40 |
|
Strong Sauce posted:Please do not just clump all your changes into one commit. I find this occasionally a problem. If one is working on a large new functional addition which has major collateral damage I prefer simply hitting the big commit rather than reversing the entire patch set and pushing smaller incremental patches.
|
# ? Sep 10, 2013 01:42 |
|
Started a new job today, did `git log` on my project. Last commit message was 'f this g earth.' Sort of mundane but lol way to start.
|
# ? Sep 10, 2013 02:10 |
|
Regarding the Pilsner dogpile, if they're doing this as responded to me:Ithaqua posted:TFS doesn't lock anything except binary files by default, although it's configurable and anyone who configures "full lock on checkout" is wrong and horrible. ...and the work items are small chunks, then their changes are indeed small. Actually to some extent they can have annoyingly terse commit messages then too. It would come down to maybe an honorable mention of the work item/story, and the justification for the nature of the solution used to close it. I had to stop my own biases because I haven't really worked in a place that has adopted the whole TFS flow. At best I've seen it used for source control, and even that was a bit rough. After a bunch of smashing around I was able to see the changeset kind of thing that TFS does. I've found it much quicker and easier to thumb through changes in git though, even in Visual Studio with Git Extensions, but that is probably mostly because the repository is a local clone. When I was looking at TFS changes, I'd have to sit on my rear end every time I wanted to look at a new one.
|
# ? Sep 10, 2013 02:42 |
|
HFX posted:I use little commits and lots of topic branches for the following reasons: I forgot about this. If you just make one big rear end commit at the end of the day labeled "new feature lol" that touches a dozen files, then god help you when you need to find the one line that hosed up something completely unrelated.
|
# ? Sep 10, 2013 03:19 |
|
It's not so easy to make a case for small commits late Sunday night after a week that had very little coding due to planning overhead. But I'll give my experience today as an example. I have a task to develop a wrapper around some computations running in AWS. So I start with an abstract interface and commit that into my local repository. Then I need to make the project build in all of its dependencies for testing, so that's another change I make and commit. Then an implementation class. Make a stub and stage it for commit. Add a big AWS call. The service call works, so I stage it again. Oh snap, AWS doesn't provide something I thought it would! So my interface design needs reworking. Commit the implementation, check out the interface change and fix it, then rebase the other changes on top of it. Now the whole commit history reflects a correct understanding of AWS functionality from the start. Fill in some methods to monitor the service call, test them and stage them. Look it over, make scattered improvements, test and stage those. The kick-off and monitoring methods are pretty interdependent so I commit the monitoring methods and then combine those two commits into one. Some of the methods are too long, so I break them up and make that a separate commit. Time to go home. Working this way I can keep up a steady pace even in the presence of risk factors. Working the old way, with centralized VC and all-inclusive commits, I'd probably bog down around the time I noticed the feature missing from AWS because instead of just running some commands to go back in time, I'd have to start up the diff tool and do it all in my head. Gazpacho fucked around with this message at 10:27 on Sep 10, 2013 |
# ? Sep 10, 2013 10:12 |
|
Innocent Bystander posted:MATLAB is the siren song of the scientific community. No; any language that can't even do basic arithmetic with 64-bit integers is not a real scientific language. gently caress MATLAB. People need to stop using this piece of garbage. MATLAB is the PHP of science and engineering; it just barely works once you figure out several dozen workarounds to make it do what you want it to do QuarkJets fucked around with this message at 12:20 on Sep 10, 2013 |
# ? Sep 10, 2013 12:18 |
|
QuarkJets posted:No; any language that can't even do basic arithmetic with 64-bit integers is not a real scientific language. gently caress MATLAB. People need to stop using this piece of garbage. MATLAB is the PHP of science and engineering; it just barely works once you figure out several dozen workarounds to make it do what you want it to do The Sirens were mythological creatures that appeared as beautiful young women living on an island and who with their irresistible singing lured passing sailors to their deaths on the rocky cliffs surrounding them. So the idiom "siren song" describes MATLAB pretty well.
|
# ? Sep 10, 2013 13:27 |
|
QuarkJets posted:No; any language that can't even do basic arithmetic with 64-bit integers is not a real scientific language. gently caress MATLAB. People need to stop using this piece of garbage. MATLAB is the PHP of science and engineering; it just barely works once you figure out several dozen workarounds to make it do what you want it to do Unfortunately I don't know of any better alternatives except maybe R. I'd be more than happy to learn about others, though.
|
# ? Sep 10, 2013 16:07 |
|
quiggy posted:Unfortunately I don't know of any better alternatives except maybe R. I'd be more than happy to learn about others, though. It depends on what you want to do, but numpy/scipy is pretty good, except it gets in your way a little more than matlab does. QuarkJets posted:No; any language that can't even do basic arithmetic with 64-bit integers is not a real scientific language. matlab's for floating point calculations.
|
# ? Sep 10, 2013 16:21 |
|
Before I ever saw SVN and CVS I had only ever used Microsoft Source(un)safe So when I started on Java/C projects at home i used UC2 compressor as it had functions like UC2 E !DTT=YYYY-MM-DD/HH:MM:SS Dynamic Time Travel (extract archive as it was at that date) Yes a Zip file utility had built in Version Control.....
|
# ? Sep 10, 2013 17:57 |
|
quiggy posted:Unfortunately I don't know of any better alternatives except maybe R. I'd be more than happy to learn about others, though. Python, R, Octave, and a dozen others. Python combines the interactivity of MATLAB with the power of a real programming language and is generally a pleasure to use. R is pretty great, too. Most importantly, both accomplish the same tasks in less time and with less code written. Octave is basically MATLAB lite and isn't that good MATLAB needs to die, I don't know what the gently caress Mathworks does with all of their licensing money but it's definitely not "release good math/science software"
|
# ? Sep 10, 2013 18:51 |
|
Ha ha ha ha Python as a Matlab replacement ha ha ha ha I like Python but it does not do what Matlab does.
|
# ? Sep 10, 2013 19:04 |
|
Look at Julia http://julialang.org
|
# ? Sep 10, 2013 19:13 |
|
Strong Sauce posted:Look at Julia http://julialang.org Now this is what I'm talking about. Gonna spend all night playing with this
|
# ? Sep 10, 2013 19:16 |
|
quiggy posted:Ha ha ha ha Python as a Matlab replacement ha ha ha ha OK, fine, 'octave replacement.'
|
# ? Sep 10, 2013 20:14 |
|
quiggy posted:Ha ha ha ha Python as a Matlab replacement ha ha ha ha You're right, Python does it much better
|
# ? Sep 10, 2013 21:20 |
|
QuarkJets posted:You're right, Python does it much better Yeah Python really is the industry leader as a matrix computation language who's with me.
|
# ? Sep 10, 2013 21:24 |
|
quiggy posted:Yeah Python really is the industry leader as a matrix computation language who's with me. I barely know what matrix computation is, but being an industry leader is a different argument from Python being better or worse than MATLAB at doing it.
|
# ? Sep 10, 2013 21:34 |
|
Thermopyle posted:I barely know what matrix computation is, but being an industry leader is a different argument from Python being better or worse than MATLAB at doing it. Fair enough. Python has no native support for matrices and is thus a laughable replacement for Matlab, poo poo though Matlab may be. Is that better?
|
# ? Sep 10, 2013 21:35 |
|
Come on man, setting up numpy takes about two seconds.
|
# ? Sep 10, 2013 21:40 |
|
quiggy posted:Fair enough. Python has no native support for matrices and is thus a laughable replacement for Matlab, poo poo though Matlab may be. Is that better? Better in one way, and worse in another. Assuming scipy/numpy don't suck in comparison to Matlab, what difference does it make if it's native support?
|
# ? Sep 10, 2013 21:40 |
|
I didn't know about scipy/numpy I'll check them out.
|
# ? Sep 10, 2013 21:43 |
|
daft punk railroad posted:Come on man, setting up numpy takes about two seconds. Oh jeez I wish.
|
# ? Sep 10, 2013 21:47 |
|
fritz posted:Oh jeez I wish. If you're on Linux, it's sudo apt-get install python-numpy (or similar with whatever package manager), and if you're on Windows there's a GUI installer. They might take a while to run but it's basically no effort.
|
# ? Sep 10, 2013 21:52 |
|
quiggy posted:I didn't know about scipy/numpy They're based on the same Fortran libraries as MATLAB, so it's remarkable how easy it is to switch from one system to the other. Python is row major whereas MATLAB is column major, but fundamentally they have the same capabilities. Python has advantages in that it's a well-designed language first and a scientific tool second. MATLAB is still great if you're just prototyping something small and already have a license and already know how to use it, but it's a dinosaur.
|
# ? Sep 10, 2013 22:30 |
|
http://wiki.scipy.org/NumPy_for_Matlab_Users
|
# ? Sep 11, 2013 01:15 |
|
Just one more piece that I have the work with. Showcases everything that is wrong with my coworkers. php:<? function checkPgStatus($db, $r, $msg) { global $DEBUG; if ($r) return 1; if (ini_get("display_errors")) echo "<br><B><I><font color=red>\n"; if (strstr($msg, "NOERRORS:")) return 0; if (strstr($msg, "DONTEXIT:")) { if (ini_get("display_errors")) { echo str_replace("DONTEXIT:", "", $msg); //echo "</B></I><br></font>\n"; echo(pg_ErrorMessage($db)); } return 0; } if (1 || ini_get("display_errors")) { print_backtrace(debug_backtrace()); echo "<br>$msg"; echo(pg_ErrorMessage($db)); } $footer=getenv("FT_FOOTER"); if (strlen(@$footer)) include $footer; echo "SQL error occured, exitting.\n"; exit(1); } ?>
|
# ? Sep 12, 2013 17:11 |
|
Vasja posted:Just one more piece that I have the work with. Showcases everything that is wrong with my coworkers. In my head I just kept screaming "NO NO NO NO NO NO NO"
|
# ? Sep 12, 2013 18:02 |
|
Strong Sauce posted:Look at Julia http://julialang.org I wish I'd known about this last year. It is not fun to do analysis on the netflix prize dataset in python.
|
# ? Sep 12, 2013 19:46 |
|
quiggy posted:Fair enough. Python has no native support for matrices and is thus a laughable replacement for Matlab, poo poo though Matlab may be. Is that better? numpy/scipy binds to the same hyper-optimized Fortran libraries that everyone else uses for scientific computing I work with a lot of people who want to write code but are not computer scientists (primarily mechanical engineers) and I would much rather handhold them through Python than MATLAB.
|
# ? Sep 12, 2013 20:27 |
|
I'd never make it in sales. Microsoft sales guy: I need you to do a demonstration on how Foo integrates with Bar Me: Foo doesn't integrate with bar at all right now. MSG: But they need it to. Me: But it doesn't. MSG: But it's a critical business requirement! Me: Then maybe Foo isn't the correct tool for them to be using.
|
# ? Sep 12, 2013 20:35 |
|
Strong Sauce posted:Look at Julia http://julialang.org This looks interesting and easy to use. And those benchmarks are outstanding. How's the library support? If I need to use a bunch of one-liner Python/MATLAB functions, will Julia code be similar or will I probably have to roll my own for a lot of the less common features? e: I answered my own question by discovering that Julia can call Python and has a lot of cross-compatibility, so anything that Python has Julia also has. http://conference.scipy.org/scipy2013/presentation_detail.php?id=203 Julia with Python libraries for whatever Julia might not have yet sounds like an interesting combination, especially for those of us who must use some looping (such as when your data array would normally exceed your memory capacity) QuarkJets fucked around with this message at 21:19 on Sep 12, 2013 |
# ? Sep 12, 2013 21:04 |
|
Ithaqua posted:I'd never make it in sales.
|
# ? Sep 12, 2013 21:11 |
|
I'd like the yum developers to feel really bad about themselves for this (though the one guy died recently, right?):Python code:
Yum is an undocumented horror to begin with so I guess this is sort of a cheap shot but hell, this behavior really bothers me.
|
# ? Sep 12, 2013 21:39 |
|
|
# ? Jun 7, 2024 06:09 |
|
Dren posted:
According to the comment, this is a ballsack?
|
# ? Sep 12, 2013 22:35 |