|
apparently it is, and the only Bachelor's program for it in California is at Cal Poly SLO
|
# ? Apr 17, 2014 01:45 |
|
|
# ? May 10, 2024 00:22 |
|
mine was in NZ and i can get into the ieee with it i guess?? thats all i know / care to know
|
# ? Apr 17, 2014 01:53 |
|
Plastic Snake posted:rewrite those methods to not use EF. done! that's pretty much exactly what i did.
|
# ? Apr 17, 2014 01:53 |
|
Star War Sex Parrot posted:is "software engineering" an actual ABET degree? there's an NCEES accreditation exam: http://cdn1.ncees.co/wp-content/uploads/2012/11/Exam-specifications_PE-Software-Apr-2013.pdf with, as of last year, a 50% pass rate
|
# ? Apr 17, 2014 07:55 |
|
getting certified in practices no employer would allow me to employ would just be depressing but it might piss off lousiana civil engineer man which is something
|
# ? Apr 17, 2014 21:42 |
|
it's you, the grovergrammer
|
# ? Apr 17, 2014 21:48 |
|
is it engineers that make those high-quality SCADA and ICS systems?
|
# ? Apr 17, 2014 22:42 |
|
i wish i could post the clusterfuck I just found at work. the embedded software behind our most successful product is 3100 lines of dynamic c without a single subfunction there are approximately 200 variables named something like tmp1, temp1, temp01, tp3, etc every operation is surrounded by an if with very specific constraints like some kind of primative quasi state machine it is so awful that it fills me with joy to look at. the cure for imposter syndrome is really, really bad code
|
# ? Apr 19, 2014 00:21 |
|
Corla Plankun posted:i wish i could post the clusterfuck I just found at work. i didnt know we worked together
|
# ? Apr 19, 2014 01:15 |
|
code:
also gently caress whoever at Sun decided that Map.get() and containsKey() should take an Object instead of a value of type K.
|
# ? Apr 19, 2014 02:28 |
|
CPColin posted:
officially, this is a maths problem. if you didn't do this you couldn't do set operations. OTOH, this doesn't work at all on comparator based maps, have a runtime exception. treemaps, a second class citizen
|
# ? Apr 19, 2014 02:52 |
|
Corla Plankun posted:i wish i could post the clusterfuck I just found at work. the software controlling those toyota ECUs that killed people had 10,000 global variables with names like that
|
# ? Apr 19, 2014 03:12 |
|
Luigi Thirty posted:the software controlling those toyota ECUs that killed people had 10,000 global variables with names like that ive had a busy career
|
# ? Apr 19, 2014 03:47 |
|
is a bad design pattern with c to create a struct like uhcode:
|
# ? Apr 20, 2014 05:27 |
|
Corla Plankun posted:i wish i could post the clusterfuck I just found at work. a verrrrrrry long time ago when i was a wee college intern i ported a bunch of fortran data fitting code to c in order to build an interactive ui & graphing around it (this was pre-web) so some guys could run it in the field on a pc instead of submitting measurements to the home office to fit on a vax the original fortran was from the days of 6-character-max identifiers and there was a naming convention of two-letter module ids followed by 4-digit function ids e.g. FU0666 you can guess what the manager of the team wanted me to do in my beautiful new c code
|
# ? Apr 20, 2014 05:44 |
|
USSMICHELLEBACHMAN posted:is a bad design pattern with c to create a struct like uh if you need to return a value AND an error code, then either have the function return the value and take a pointer to a variable to hold the error code, or vice versa. personally i'd go with the first one (function returns value) so that you can use the function in an expression if need be. returning a struct containing the return value and error code is very non-C and gay and dumb. as to returning 0, remember that the idiom in C is for an error code of 0 to indicate success rather than failure (except in very specific cases, like for functions that return pointers).
|
# ? Apr 20, 2014 06:02 |
|
Doc Block posted:if you need to return a value AND an error code, then either have the function return the value and take a pointer to a variable to hold the error code, or vice versa. personally i'd go with the first one (function returns value) so that you can use the function in an expression if need be. returning a struct containing the return value and error code is very non-C and gay and dumb. OKAY. i've been using a pointer to indicate error status it just seems messier to me than returning a struct. i guess i'm somewhat confused about how you said 'if you need to return a value AND error code.' should i just be designing my code so that this is a rare situation? the problem i'm having is that due to the static typing, you have to return a value of the type specified, and unless you know that you can restrict the output of the method to some range, you cant pick a return a value to indicate failure.
|
# ? Apr 20, 2014 06:43 |
|
USSMICHELLEBACHMAN posted:is a bad design pattern with c to create a struct like uh this is a roundabout approach to option types but as doc block says they're "non-C". iirc the traditional approach to error codes is the errno header: you set errno to zero, make a call, then test errno afterwards to see if it's become nonzero obviously this doesn't parallelize very well but it's what the library uses so~
|
# ? Apr 20, 2014 07:15 |
|
coffeetable posted:this is a roundabout approach to option types but as doc block says they're "non-C".
|
# ? Apr 20, 2014 07:22 |
|
code:
code:
USSMICHELLEBACHMAN posted:should i just be designing my code so that this is a rare situation? Yes. USSMICHELLEBACHMAN posted:OKAY. i've been using a pointer to indicate error status it just seems messier to me than returning a struct. If your function returns a pointer, just have it return NULL on error. You can use the above method to clarify exactly what error occurred if need be. Just be nice and have the error code not be required (pass NULL if you don't care), in case the caller of the function doesn't care why the function failed, just that it did. Doc Block fucked around with this message at 08:07 on Apr 20, 2014 |
# ? Apr 20, 2014 08:04 |
|
more like P(ee)
|
# ? Apr 20, 2014 09:56 |
|
Morkai posted:my chickens, they have come home to roost. currently tasked with "performance optimization" of our EF use. lol lol
|
# ? Apr 20, 2014 14:13 |
|
CPColin posted:
i'm an idiot but would someone mind explaining what's so bad here? it seems important to retain the possible many to one properties of a map, should it be replaced with an entrySet() thing?
|
# ? Apr 20, 2014 16:37 |
|
yes, it should use entrySet(), so you don't have to do a get() for each iteration.
|
# ? Apr 20, 2014 16:43 |
|
CPColin posted:yes, it should use entrySet(), so you don't have to do a get() for each iteration. what like this http://docs.oracle.com/javase/6/docs/api/java/util/Map.html#entrySet()
|
# ? Apr 20, 2014 16:54 |
|
yes:code:
code:
|
# ? Apr 20, 2014 17:05 |
|
CPColin posted:yes, it should use entrySet(), so you don't have to do a get() for each iteration. cool thanks
|
# ? Apr 20, 2014 17:07 |
|
ohhh thought you were complainin that sun hadn't included an entrySet method
|
# ? Apr 20, 2014 17:07 |
|
i want the equivalent of c#'s "using(butt) {}" in c am i a monster if i implement this with a preprocessor macro like #define USING_BUTTS(X) prepare_butt(); X ; release_butt(); and then later in my code be all like USING_BUTTS ( poorly_written_code; )
|
# ? Apr 21, 2014 22:29 |
|
sounds like a pretty cool idea to me
|
# ? Apr 21, 2014 22:47 |
|
i feel like its bad, but i cant tell you why
|
# ? Apr 21, 2014 22:51 |
|
Valeyard posted:i feel like its bad, but i cant tell you why same
|
# ? Apr 21, 2014 22:52 |
|
Bloody posted:i want the equivalent of c#'s "using(butt) {}" in c am i a monster if i implement this with a preprocessor macro like encapsulate the code X as a function x(*state) that takes a pointer to any state it needs to dick about with, then write a method code:
|
# ? Apr 21, 2014 22:54 |
|
Valeyard posted:i feel like its bad, but i cant tell you why Bloody posted:same because you're gonna change the names of prepare_butt and release_butt somewhere down the line and its all gonna stop working
|
# ? Apr 21, 2014 22:55 |
|
coffeetable posted:encapsulate the code X as a function x(*state) that takes a pointer to any state it needs to dick about with, then write a method this is embedded all of my state is global also changing the function names will cause a compiler error, leaving a random function x(*state) around will tempt future me into using it without calling try_with_butts and the butts are NOT optional!!!
|
# ? Apr 21, 2014 22:57 |
|
nrook posted:poo poo I forgot c# had nice anonclasses like that, it's been too long. also I'm not sure I ever knew there was a select that gave you the indices. in that case yeah the linq way is better hm, it's almost at though bad code begets bad code
|
# ? Apr 21, 2014 23:06 |
|
Bloody posted:i want the equivalent of c#'s "using(butt) {}" in c am i a monster if i implement this with a preprocessor macro like ghetto raii just use cpp
|
# ? Apr 21, 2014 23:47 |
|
coffeetable posted:
|
# ? Apr 21, 2014 23:53 |
|
Malcolm XML posted:ghetto raii
|
# ? Apr 21, 2014 23:54 |
|
|
# ? May 10, 2024 00:22 |
|
Bloody posted:this is embedded all of my state is global if butt is something with an address, pass it to x along with the state or have prepare_butts() return a token representing the fact the butts have been initialized, and pass the token to x(). no token, no execution. or seeing as you're throwing global state around already just have prepare_butts() set a butts_prepared global flag. then first thing that x() and release_butts() does is check the flag is set; if it isn't, they either return silently or throw an error
|
# ? Apr 21, 2014 23:55 |