|
i've been writing code professionally for about 12 years with about 10 years of coding for fun/school before that finally a thread for me
|
# ¿ May 7, 2013 21:00 |
|
|
# ¿ Apr 27, 2024 16:08 |
|
i'm a terrible coder but everyone i work with is worse (i don't work at google or apple btw)
|
# ¿ May 7, 2013 21:01 |
|
i have two guys on my team that aren't programmers but who program things had to teach one of them about source control today, like really basic stuff like "no you don't have to check one file in at a time" getting to old for this poo poo sick of being a team lead next job i'm just gonna pretend i'm autistic so they stop putting me in charge of people
|
# ¿ May 7, 2013 21:08 |
|
the best part of being a coder is going back and looking at old code and being like "what the hell is this poo poo this is terrible" then checking the repo history and seeing it was u
|
# ¿ May 8, 2013 19:47 |
|
i started out writing reports, it was actually useful to my career because the one thing programmers are consistently terrible at is database design and writing sql queries for a year really teaches you about it if you apply yourself correctly
|
# ¿ May 8, 2013 21:55 |
|
uG posted:by using an ORM and/or SQL abstraction to skip the whole learning sql poo poo i, unlike the esteemed mr. shaggar, do not immediately discount orms but they're only really good for crud stuff and won't help you with performance bottlenecks, indexing strategies, proper 3nf table design, etc i've used orms but i don't believe code-first works very well at all
|
# ¿ May 8, 2013 22:12 |
|
Tori CMOS posted:shaggar is right tbf (i hear) cognos is the worst of the worst but yeah i've seen some pretty hilarious queries from nhibernate and then you get the bright idea to start loving around with hql and it ends with an ankle bracelet, house arrest, and 300 hours of community service
|
# ¿ May 8, 2013 22:32 |
|
Martytoof posted:how do i make a webpage with it petition to revoke "safe zone" status from the thread
|
# ¿ May 8, 2013 22:56 |
|
Martytoof posted:ok so how do i ecommerce with it oh no if it's ecormmerce i think u gotta use lisp here is a link to a webzone to help you out: http://paulgraham.com/
|
# ¿ May 8, 2013 23:00 |
|
this thread is seriously inspiring me to be a less poo poo coder, i went from awful terrible retarded shitfuck coder to awful terrible retarded coder and i really want to get up to awful terrible coder before i retire
|
# ¿ May 8, 2013 23:46 |
|
qbasic
|
# ¿ May 9, 2013 22:29 |
|
why is there nothing like notepad++ for osx?
|
# ¿ May 10, 2013 13:06 |
|
OBAMA BIN LinkedIn posted:i'm currently editing code which has the worst loving brace style i've ever seen. the person puts his code 2 spaces before the opening brace, so it looks like: kick his rear end, sea bass!
|
# ¿ May 10, 2013 17:49 |
|
barf and poop keytar
|
# ¿ May 11, 2013 03:33 |
|
queef and menstruate moog synthesizer
|
# ¿ May 11, 2013 03:40 |
|
prefect posted:resharper says to do "var whatever" instead of "SomeConvolutedClassNameHere whatever". (http://resharper.blogspot.com/2008/03/varification-using-implicitly-typed.html) but when you do that, the autocomplete says "gently caress you, i'm not going to try to figure that poo poo out" i kinda like var when the type name is ridiculously long but i turned that rule off in resharper so it would stop suggesting it
|
# ¿ May 12, 2013 00:57 |
|
prefect posted:although i fixed the indenting so it does proper k&r style *slaps u with rolled up newspaper*
|
# ¿ May 12, 2013 01:24 |
|
yo here's a thing if you want to learn vim and graduate to a better level of coding http://vim-adventures.com/ don't forget to buy a license
|
# ¿ May 13, 2013 02:42 |
|
b-b-but gamification!!!!!!
|
# ¿ May 13, 2013 02:57 |
|
does vimtutor have achievements yet?
|
# ¿ May 13, 2013 02:57 |
|
prefect posted:yeah, i'm doing a section that's name-value pairs, but it now looks like i'll need a second section where it's a list of patterns that i have to match the computer name against is this some sort of deployment thing where you do different settings for different servers? if so look into slowcheetah. if this is client side stuff, lol sorry have fun
|
# ¿ May 13, 2013 16:04 |
|
Shaggar posted:vs2012 has slowcheetah built in for the default config files (app.config, web.config,etc...) oh yeah? cool. maybe i'll upgrade this year, after i get a new machine. 2010 is bad enough on this pos laptop.
|
# ¿ May 13, 2013 16:27 |
|
Shaggar posted:I need to get an ssd cause this spinny drive sucks, but vs2012 is still decently fast. i have a core2duo 2.4 GHz w/ 4 gigs of ram running win7 (32 bit lol) the disk is 7200 rpm too i don't get why it's so bad/slow everything just chugs but outlook and vs2010 are the worst
|
# ¿ May 13, 2013 18:54 |
|
prefect posted:how do i map a network drive with c#? there's no straight up native .net way to do it iirc easiest way to do it and avoid the windows api is do a process.start to invoke "net.exe use \\server\path\goes\here\"
|
# ¿ May 14, 2013 12:39 |
|
lol if you try to get fulfillment at work it's a job, just do it, go home, and then do whatever really makes you happy or makes you feel accomplished
|
# ¿ May 14, 2013 16:07 |
|
Tiny Bug Child posted:sounds like your job sucks, the only thing here that applies to me is "watching porn at work" you got it worse than me. i got bored with coding for fun because of coding for work, at least watching porn is still fun for me
|
# ¿ May 14, 2013 16:20 |
|
Tiny Bug Child posted:sorry about your misogyny i only watch organic vegan bespoke artisinal porn
|
# ¿ May 14, 2013 17:05 |
|
prefect posted:but my program actually works! gently caress those people, this is when programming is still super fun plenty of time to be jaded about coding in the future
|
# ¿ May 14, 2013 17:32 |
|
um no wtf don't use exceptions for normal control flow, test for potential conditions that will cause exceptions and handle them in advance whenever possible
|
# ¿ May 18, 2013 00:49 |
|
exceptions are a form of non-local goto and should only be used when you have a condition where halting your program and handling it is the only alternative to crashing they are expensive as gently caress to throw in a lot of languages too caveat: i'm a .net programmer primarily, i understand python does weird poo poo like using exceptions for control-flow
|
# ¿ May 18, 2013 00:51 |
|
less terrible coders than me talk about it here: http://c2.com/cgi/wiki?DontUseExceptionsForFlowControl
|
# ¿ May 18, 2013 00:53 |
|
PleasingFungus posted:it's entirely possible for one section of code to be unable to handle an error condition (e.g. "missing file"), which a higher-level section of code can handle & recover from the higher order code should check for the file in advance and handle it then if its something that will happen often (ie normal code flow) exceptions are reserved for unexpected error conditions If it doesn't happen often then it won't hurt to have break on exception turned on and it will help you realize you have a problem if it starts happening suddenly even if your code is robust and recovers ur wrong on this sorry
|
# ¿ May 18, 2013 01:12 |
|
if exceptions are indeed used for normal control flow in python the name for them sucks sorry to have to go all shaggar on y'all
|
# ¿ May 18, 2013 01:14 |
|
PleasingFungus posted:tbqh I don't really understand how you can reconcile you use them for catching and handling exceptions that are a possibility but do your best to ensure they are never caught in the first place by guarding for them wherever possible if it is a common scenario in your application that files may not be present or may not validate in some manner, you should be testing for that in the normal flow of your program and dealing with it within the normal flow of your program because it is expected. if that means more thorough testing in each function and passing poo poo back up the stack, so be it. if it is an uncommon scenario in your application that files may not be present, then by all means use an exception, but treat it like the catastrophic event that it is. catch it and deal with it (eg stop program flow, log the error, have it send an expletive filled sms to your webserver cj's wife) in c# a good example is using int.TryParse vs int.Parse - you use TryParse when you expect conversion to fail and you use Parse when you never expect it to fail and if it does you want an exception generated. now, to be fair, i am arguing from authority (essentially, everyone knows non-local goto is bad and should be avoided ). i'm not going to get into all the reasons why non-locally scoped gotos are a bad idea, but if you want to argue that you like being able to shortcut your way up the stack in a non-obvious way when something you expect to happen 5% of the time happens and you don't mind incurring the performance hit for doing so, not to mention making your code less obvious in it's expected operation, have at it but i pity anyone that works on your code base 5 years from now.
|
# ¿ May 18, 2013 04:02 |
|
heyyyyy look at me i'm arguing on the internet about programming on friday night
|
# ¿ May 18, 2013 04:06 |
|
PleasingFungus posted:hm. I guess the question is something like this: you're avoiding my main point and a few of my side points. main point: if it's something that frequently or commonly happens that your program is expected to deal with and continue, you are dealing with control flow and should not rely on exceptions because they are an expensive non-obvious shortcut up the call stack. for example, if you're dealing with a resource in A that will frequently be unavailable and you need to notify C, it should be documented in the interface for A and B as a return/out value. yes this is more work. if it's something that rarely happens, it's an exception and you should pass it up the stack, log it, probably halt the process or program depending on the exception type, etc. side points: - generating exceptions is an expensive operation. it's wasteful because you're rolling up the call stack and consuming excessive memory and processing power when a simple bool might be more than enough. - you're hiding functionality. in your example, C knows that A might fail but since B doesn't know, if someone else consumes B they might not be prepared for the fact you're using a non-obvious method of controlling program flow, at least as far as the language is concerned (contrast this with an out parameter in a method signature). i guess checked exceptions might help with this, i'm not a java guy so i don't know much about them. and yeah, maybe python does it differently but like i said, they should at least call it something else then. semantics matter and words have meaning. - you might accidentally swallow other exceptions (i didn't mention this before but it is a possibility, unless you start generating custom exceptions purely to handle control flow which is more work anyway so you probably wouldn't do that)
|
# ¿ May 18, 2013 05:20 |
|
cliffy posted:
apparently this is basically how python iteration works if what i read is true shaggar was right!?
|
# ¿ May 18, 2013 05:50 |
|
PleasingFungus posted:I think this argument has turned into "exceptions are fine to use for a lot of thing in Python!" "no they're terrible to use except for really rare cases in C#!" "no they're fine in Python!" "no they're terrible in C#!" *high pitched voice* python coders code like thiiisssssss and *low pitched voice* c# coders code like thiiisssssss Cold on a Cob fucked around with this message at 12:56 on May 18, 2013 |
# ¿ May 18, 2013 12:52 |
|
i had to edit that because all the black developers i know use c# and all the python coders i know are skinny white dudes with high pitched nasally voices
|
# ¿ May 18, 2013 12:58 |
|
|
# ¿ Apr 27, 2024 16:08 |
|
i comment non obvious stuff (why not what)
|
# ¿ May 18, 2013 13:20 |