|
Here I wrote a quine for you:code:
|
# ¿ May 8, 2013 09:44 |
|
|
# ¿ Apr 28, 2024 01:50 |
|
its funny because even in C# you still need to handle the exception when you open a file that doesn't exist, because someone could have deleted it after you checked for it but before you actually opened it
|
# ¿ May 18, 2013 14:03 |
|
i write my random one-off scripts in perl because its practical extraction and reporting language
|
# ¿ May 4, 2014 03:55 |
|
Shaggar posted:no. method calls should always have parentheses yes, but what about functions?
|
# ¿ May 9, 2014 15:41 |
|
object-oriented programming: for when you want to pass an agglomeration of random state into every single function but don't want to admit it
|
# ¿ May 10, 2014 01:03 |
|
no the point is that what exactly is in "3 ounces of flour" is different depending on where in the world you are. so the quantity of flour you want to use in proportion to other ingredients can also vary. also a recipe that uses eggs is not vegan
|
# ¿ May 20, 2014 01:55 |
|
it's way easier to get a good job if you already have a job, even if your current job is kind of sucky. you also have the luxury of waiting until a good offer comes along instead of worrying about whether there'll be another one if you don't take this. getting a job when you're unemployed / "working on your own projects" is p. hard in comparison.
|
# ¿ Jun 6, 2014 16:08 |
|
the easy way to think about it is "how does regular arithmetic work", then you think "how can i extend that to numbers bigger than a machine register" if you really feel like it you can then think of faster ways to do those things, but that's not necessary if you're just after a working implementation
|
# ¿ Jun 17, 2014 12:20 |
|
but enough about coding from the bathtub
|
# ¿ Jul 8, 2014 10:29 |
|
Squinty Applebottom posted:sql is fine for what it is until you hit scaling issues and have to port your entire backend of a production app to something better unless you're literally serving a million simultaneous connections your scaling issues are not caused by sql. and even then you can trivially shard it into a rw master and ro replicas.
|
# ¿ Jul 15, 2014 12:01 |
|
you should almost certainly try tdd if you haven't yet you don't have to stick with it after you've tried it tho
|
# ¿ Sep 28, 2014 15:10 |
|
If there's a 1:1 relationship then there's no need to have a separate foreign key at all, both models should have the same key. Is there actually a many:1 relationship going on? If so, in what direction?
|
# ¿ Oct 5, 2014 09:06 |
|
There are reasons to want to use out or ref parameters, but Java doesn't have native support for them the way C# does. For that reason I'd recommend redesigning your code so that they aren't necessary. (Like, maybe return the new value instead?) At the very least, your Variable class should use generics: Java code:
|
# ¿ Oct 15, 2014 15:10 |
|
Why do you care what the code that actually accesses the db looks like? I mean yeah it's a shitpile of querying multiple tables and munging the results into some objects, but it's not like that interferes with your real code so who cares? OTOH if that stuff is leaking into your business logic somewhere you done hosed up.
|
# ¿ Nov 21, 2014 11:43 |
|
there's really nothing wrong with making your native "application" just embed a webview control for its UI. CSS sucks, but it sucks less than a whole lot of other UI frameworks you might consider.
|
# ¿ Dec 5, 2014 13:14 |
|
Shinku ABOOKEN posted:can web ui do drag and drop and multiple selection yet?? Drag and drop is really straightforward. You set the property that says an element can be dragged, and then you define event handlers on valid places that it can be dropped.
|
# ¿ Dec 5, 2014 15:37 |
|
The direct analogy to a shelfset would be the stash, but when actually working with git you typically use branches for most of the things you'd want a shelfset for anyway.
|
# ¿ Dec 6, 2014 05:28 |
|
my commit messages don't matter since it all gets pulled out into a single thing (with a new description) when it gets sent out for code review the only person who sees them is me
|
# ¿ Dec 6, 2014 06:15 |
|
b0lt posted:also don't forget the part where a bunch of white people went "all rook same" at the characters and mashed them all together i really want to know what the thinking was behind having three different code points for the letter o that are rendered identically, plus another dozen for "o in different fonts" (which you'd think would be better handled by having ... different fonts), all while mashing anything that looks even remotely similar in non-latin scripts into a single code point.
|
# ¿ Dec 10, 2014 14:46 |
|
but seriously as soon as i started reading that my question was "why the gently caress does everyone care what version the DEV database is using?" like, just bring up your own database with some suitable test data when you're testing your local changes. then once that change actually gets to master the dev server gets the new configuration
|
# ¿ Dec 20, 2014 10:00 |
|
pointsofdata posted:there's a stylecop rule which says any use of #region is not allowed, which i don't really get. maybe that's why i'm in this thread! Your IDE should be able to collapse sections of the file without needing to pollute the file itself with junk that everyone else has to deal with. -- Also why the gently caress can't you just take your QA build and move it to production as-is? lol if you're manually merging things again to create your prod build, because now there's no guarantee that what was tested by QA is actually the same thing as what you're releasing. Whoever is in charge of your release process has hosed up big time.
|
# ¿ Dec 23, 2014 00:04 |
|
Space Whale posted:The guy who did it is new to git. FWIW we all miss TFS. Maybe we can go back to it. it's not even a git thing, this is just basic release management. is the guy completely new to software development or something?
|
# ¿ Dec 23, 2014 01:06 |
|
Valeyard posted:a terrible programmer question, why does the regex, pretty sure that regex over the given input matches the "-test -test1 -test2 " part. the capturing group inside the regex, of course, will be filled in with whatever the value was the last time it matched - i.e. "test2". what you actually want to be doing is
|
# ¿ Dec 24, 2014 05:55 |
|
rotor posted:just write your builds in shell or python or whatever scripting language you like because you'll end up doing it eventually so you might as well start it out cleanly instead of having 10 different build systems knit together with shell scripts TBH this is probably fine if your project is small enough that you don't care about being able to do incremental builds
|
# ¿ Jan 13, 2015 04:58 |
|
rotor posted:there's nothing that prevents you from doing incremental builds in shell you're going to write your shell script to check which dependencies need to be recompiled and only rebuild the things that do? if you gently caress that up even once, someone wastes a bunch of time dealing with an "impossible" bug caused by not recompiling something that needed to be recompiled, and then no-one trusts your incremental builds anymore and wastes a whole bunch of time doing full builds because they at least know they'll be correct.
|
# ¿ Jan 13, 2015 09:14 |
|
FamDav posted:then again why would you waste dev time on this yeah that's kind of what I'm getting at. having a shell script that runs cc on all your source files is trivial, having one that does proper dependency tracking and incremental builds is basically reinventing <insert build tool here> except in a lovely bespoke form.
|
# ¿ Jan 13, 2015 09:48 |
|
when the costs are effectively nothing you can still make the claim "you should do at least this much" and be objectively correct. you seem to think that people are also saying "but don't put any more effort into it than we do", when that's really not what they're talking about
|
# ¿ Jan 14, 2015 15:43 |
|
Serious question, how does code review (real code review, the kind where you have someone review and sign off on it before the code actually gets added to trunk) work with svn? With git you have a branch with your proposed change and your reviewer looks at that and pulls it to the master repo if they think it's good. But it sounds like actually using svn branches is discouraged over on that side of things?
|
# ¿ Jan 18, 2015 01:05 |
|
suffix posted:i have a terrible programmer question: how do you do dependency injection right? Guice (and presumably other "magical" DI frameworks, though Guice is the only one I'm familiar with) are really cool when you have the discipline to avoid shooting yourself in the foot with them. They make it really easy to shoot yourself in the foot, but if you can avoid that they're all good. Basic rules are to avoid everything "clever" that the framework lets you do, only inject concrete classes, avoid scopes except for maybe singletons, don't use annotated injections to get multiple different things of the same type. Then it's basically just a way to instantiate objects without needing to know what their dependencies are (which is the whole point of a DI container rather than doing manual DI), while still being able to bind everything to mock instances etc. in your tests. Once you've wrapped your head around it enough to avoid making write-only spaghetti code, you can identify situations where a "clever" feature makes something less painful and won't make you regret it when you have to debug things later. If you're doing it right then the only code that's actually tied to a specific injection container is the top-level stuff that configures bindings (which you won't have many of if you follow the basic rule and only inject concrete classes) and requests an instance of whatever object is the root of your object graph. Everything else just has an annotation that says it should be DIed and wouldn't need any changes if you switched to a different container for whatever reason.
|
# ¿ Jan 18, 2015 11:55 |
|
the code currently keeps track of the largest number it's seen so far in the aptly-named "largest" variable. the experiment is asking you to add another variable (say, largestKind) that keeps track of what kind the largest number seen so far happens to be.
|
# ¿ Jan 19, 2015 11:28 |
|
you should post something that you've tried but isn't working - it's way more instructive to point out where your existing approach went wrong than it is to just give a solution (or a process to derive a solution) from nothing.
|
# ¿ Jan 19, 2015 11:39 |
|
Single-implementation interfaces are dumb as poo poo. Yes, your class should have a sane public interface and you should stick with it instead of gratuitously adding methods all over the place. No, you don't really need a FooManager interface plus a FooManagerImpl class. If you find that later on you do need multiple distinct implementations, you can refactor things easily enough.
|
# ¿ Jan 23, 2015 03:35 |
|
Valeyard posted:i get that its all to do with referncing but i still think one of those two approaches should work i don't think it has anything to do with referencing try printing out the values (and keys) as they get iterated over, and make sure they're what you expect
|
# ¿ Feb 10, 2015 15:17 |
|
Shaggar posted:idk what postman is but its probably ignoring cross domain security. this is why people use jsonp for cross domain stuff. altho setting up cors support in webapi isn't hard Ah yes, jsonp. Also known as "I don't know how to configure my server correctly, so instead, how about anyone using my api has to give me the ability to xss their site at will".
|
# ¿ Feb 11, 2015 06:00 |
|
same but to passive-aggressively point coworkers at (actually my coworkers are all totally fine, I just wanted to make a joke about nerd stereotypes)
|
# ¿ Feb 14, 2015 02:02 |
|
fart simpson posted:what are promises and how are they related to and/or better than callbacks? basically a 'promise' is an object that calls a callback when some operation has finished (or failed). it has sensible semantics (like, if you say "hey call this function when you're done" on a promise that's already been resolved, that function still gets called instead of being forgotten about), and having a common api for every thing-that-calls-a-callback-when-it's-done means that you can get lots of cool utility functions to manipulate promises and avoid your async code turning into callback hell
|
# ¿ Feb 20, 2015 13:49 |
|
triple sulk posted:yeah just like commercials, which was supposed to be illegal now iirc but still happens anyway i'm pretty sure they're not louder in terms of how many dB they are, they just use some funky audio processing to sound louder without breaking the law. which is actually kind of cool but also kill all marketers
|
# ¿ Feb 21, 2015 01:49 |
|
having the new guy work directly on the client's production database seems like a massive horror actually, doing anything at all in production other than "roll out a new version" is highly suspicious. clone that stuff to a dev instance (if necessary) and work on it there.
|
# ¿ Feb 21, 2015 06:54 |
|
~Coxy posted:3. unit testing (or to be precise, mocking) relies on you implementing an interface for the object you want to mock so get used to it. yes this is dumb. not any more, thank god we still have way too many single-implementation interfaces littering our code for precisely this reason, I try and delete them when I can because it really pisses me off
|
# ¿ Mar 6, 2015 15:01 |
|
|
# ¿ Apr 28, 2024 01:50 |
|
~Coxy posted:what do you mean? i know this is way late but any reasonable mocking framework will let you create a mock for a (non-final) concrete class. no need to use a single-implementation interface to be able to mock it out in a test.
|
# ¿ Mar 7, 2015 11:25 |