|
Pie Colony posted:c++14 thankfully seconding that you need to find resources targeted at c++11 at a minimum. stackoverflow probably has a list of poo poo to read templates are a big thing in c++ and trying to understand them from a c or java perspective will fail. those are my main languages as well and if I needed to be actually good at c++ i'd get a book on templates
|
# ? Dec 17, 2018 21:08 |
|
|
# ? Oct 13, 2024 01:16 |
|
do you still have to do dumb workarounds with template impls and header files to make compiling and linking work properly, or has that been fixed since C++11/as build systems have improved, too i remember something like either putting implementation(s) in the header file (which i'd rather do anyway organizationally, tbh; C# has made me hate .h files) OR you have to include the .cpp file from the bottom of the .h or something
|
# ? Dec 17, 2018 21:19 |
|
Ciaphas posted:do you still have to do dumb workarounds with template impls and header files to make compiling and linking work properly, or has that been fixed since C++11/as build systems have improved, too c++ is supposed to get modules eventually but millenials killed it. at least i assume we have succeeded by now cause that post is from a year ago. sorry
|
# ? Dec 17, 2018 21:26 |
|
looking for jobs again. thinking about trying to go for a small corp to hopefully weather the recession. also just thinking about trying to find the most money i can to milk it. either way i'm trying to find a job where i dont need to kill myself and can just do my job and be happy. feeling good about it. my mental state has improved significantly.
|
# ? Dec 17, 2018 21:38 |
|
looks like 2019 is the new year of the job!!!
|
# ? Dec 17, 2018 21:39 |
DONT THREAD ON ME posted:looking for jobs again. thinking about trying to go for a small corp to hopefully weather the recession. the most money to milk and feeling good about your company seem to be polar opposites. like, i don’t think i could find a better paying gig right now, by a mile, but i primarily work on payday loans
|
|
# ? Dec 17, 2018 21:48 |
thankfully i forgot my moral compass at parent’s home
|
|
# ? Dec 17, 2018 21:48 |
|
kinda thinking about getting into ios dev. pros: 1. maybe more interesting than web dev: - more constraints (battery, etc). i'd like more experience with caring about performance beyond io. - i get to reason about a single runtime. i've only had to think about the runtime of a webserver and that gets boring after a while. 2. lots of crossover with my current skillset, since designing a backend for a native client is really not all that different from an http/js client. 3. pay seems good. 4. swift is rad. cons: 1. i'm really not a heavy or advanced user of mobile devices. 2. i don't care about apps. 3. ??? thoughts?
|
# ? Dec 17, 2018 21:54 |
what’s the proportion of swift shops vs whatever is the react native of current year
|
|
# ? Dec 17, 2018 22:20 |
|
using anything but the native toolkit on a mobile platform is a surefire way to make the worst product possible
|
# ? Dec 17, 2018 22:27 |
|
Ciaphas posted:do you still have to do dumb workarounds with template impls and header files to make compiling and linking work properly, or has that been fixed since C++11/as build systems have improved, too completely separating template interfaces and implementations has been tried (the "export" keyword) and unanimously rejected by all compiler writers for being extremely hard to implement and making C++ incompatible with conventional linkers. exactly one vendor implemented it and even they advocated for the removal of the feature from the standard that said, some separation is still possible, and the right way depends on what's the reason for the separation binary compatibility/ABI stability? "flatten" the ABI as a set of virtual classes and plain functions, possibly even extern "C" functions. lots of C++ libraries do this including all C++ runtime libraries. as a bonus, it can minimize code size explosion, for example in STLPort (an old compiler-independent implementation of the standard c++ library) all specializations of set and map were funneled through a single common R/B tree implementation written in C reducing (although not minimizing) build times and code duplication? explicitly instantiate your templates for the most common sets of parameters. the explicit instantiations can then even be exported and imported from dlls (as always, it helps to think of templates as compile-time functions that generate perfectly standard C++ classes/functions that you could write yourself manually) separation of interface and implementation? only the "flattening" idiom guarantees it. explicit instantiation can do it, at the cost of making not explicitly instantiated specializations unavailable - i.e. you have to know in advance all types your templates will be used with. it's not even that bad! turd.h: C++ code:
C++ code:
C++ code:
turd.h: C++ code:
C++ code:
finally, if your goal is to completely hide the implementation of a template, forget about it. it's been rejected as a misuse of c++ and between that and the "export" tragedy, it's probably never going to be considered as a feature again e: including the cpp from the .h is kinda pointless and equivalent to just leaving the implementation in the .h file hackbunny fucked around with this message at 23:23 on Dec 17, 2018 |
# ? Dec 17, 2018 23:20 |
|
lot of cool info, thanks (e) i'm willing to accept "because that's how the language and compiler standards are historically put together, sorry" but i still don't see the actual code benefit Ciaphas fucked around with this message at 01:20 on Dec 18, 2018 |
# ? Dec 17, 2018 23:38 |
|
Pie Colony posted:all of my programming opinions are for sale
|
# ? Dec 17, 2018 23:38 |
|
DONT THREAD ON ME posted:kinda thinking about getting into ios dev. i transitioned from doing web backend in python to iOS a couple years ago, and i've been very happy with the switch. by far the biggest learning curve for me was the uikit api and autolayout, the networking and storage stuff has been wonderful to work on especially since the Codable protocols came out.
|
# ? Dec 18, 2018 03:09 |
This is a really good post with a lot of neat tricks I hadn't seen before. Thanks!
|
|
# ? Dec 18, 2018 07:08 |
|
c tp s: rewriting a SQL lateral join in python
|
# ? Dec 18, 2018 08:43 |
TheFluff posted:c tp s: rewriting a SQL lateral join in python congrats on your for loop
|
|
# ? Dec 18, 2018 08:46 |
|
CRIP EATIN BREAD posted:using anything but the native toolkit on a mobile platform is a surefire way to make the worst product possible yeah op, use react native or xamarin or html/css/js in a webview
|
# ? Dec 18, 2018 10:48 |
|
cinci zoo sniper posted:congrats on your for loop i got away without it, managed to sell the team on the pure sql solution because everyone agreed that the python version was actually less readable/maintainable (lack of familiarity with lateral joins and maintainability concerns was the argument for not using the pure sql solution in the first place)
|
# ? Dec 18, 2018 14:41 |
|
is it possible to post about the context of that lateral join or is it too hard to talk generally about without doxxing your job? thats one of those things that i kinda know of but have never had to use or even consider using so i don't know what the good applications of it are
|
# ? Dec 18, 2018 15:20 |
Corla Plankun posted:is it possible to post about the context of that lateral join or is it too hard to talk generally about without doxxing your job? laterals are useful well, for doing an operation per row, as it says on the tin. a common use case for me is to, say table a with N entities of A per X table b with M entities of B per X here I use later to select all a.N-5 entities and join them up with the most recent B as of each N-5
|
|
# ? Dec 18, 2018 15:38 |
|
yeah one of the things I use a lot is to grab the N latest entries of satellite messages from X devices in a table, and lateral joins are by far the fastest way to do it without changing the schema. postgres owns
|
# ? Dec 18, 2018 15:40 |
|
can i call myself an architect yet?code:
|
# ? Dec 18, 2018 16:50 |
|
NihilCredo posted:can i call myself an architect yet? google cache invalidation. you'll thank me later
|
# ? Dec 18, 2018 16:55 |
|
Arcsech posted:what oh whoops misunderstood sorry
|
# ? Dec 18, 2018 16:57 |
|
animist posted:google cache invalidation. you'll thank me later oh i have that, it's called alt-f4
|
# ? Dec 18, 2018 17:04 |
|
Phobeste posted:oh whoops misunderstood sorry
|
# ? Dec 18, 2018 17:21 |
|
NihilCredo posted:oh i have that, it's called alt-f4 ah yes, the "snowpiercer" approach to software development
|
# ? Dec 18, 2018 17:29 |
|
CRIP EATIN BREAD posted:yeah one of the things I use a lot is to grab the N latest entries of satellite messages from X devices in a table, and lateral joins are by far the fastest way to do it without changing the schema. oh loving lordy again i'd have killed for this feature at work, stupid ancient (11g) version of ora
|
# ? Dec 18, 2018 17:52 |
|
Coworker unironically suggesting that our app's exception handling should "learn" which exceptions are fatal and which aren't, as well as which exceptions are temporary in nature (it should continue to process) and which are permanently fatal (it should restart itself)
|
# ? Dec 18, 2018 17:52 |
|
cinci zoo sniper posted:what’s the proportion of swift shops vs whatever is the react native of current year 100% of the shops you actually want to work at are swift shops there’s basically two categories of companies that use react native/xamarin/etc: 1. fad chasing fart huffers 2. companies with zero budget for the app who are looking for the cheapest option regardless of quality
|
# ? Dec 18, 2018 19:10 |
speaking of swift, ill be doing failed attempt to code at home #27 sometime next spring and i think ill try swift this time
|
|
# ? Dec 18, 2018 19:16 |
|
i should probably do some at home toys/projects at least so i don't feel like I'm rusting again boo @ "working" at home, though!
|
# ? Dec 18, 2018 19:17 |
Ciaphas posted:i should probably do some at home toys/projects at least so i don't feel like I'm rusting again i mean, i love reading this and pl thread and hacker news etc even when its like hackbunny's 69th 800 word post in a thread about some subtleties of windows 95 gui radio menu api due to attempted kernel level mitigation of impact of gamma rays hitting the cpu, but i struggle to find it engaging to actually code something up at home, code or not
|
|
# ? Dec 18, 2018 19:20 |
i am extremely motivated, however, to reason about or contemplate coding at home
|
|
# ? Dec 18, 2018 19:21 |
|
cinci zoo sniper posted:i mean, i love reading this and pl thread and hacker news etc even when its like hackbunny's 69th 800 word post in a thread about some subtleties of windows 95 gui radio menu api due to attempted kernel level mitigation of impact of gamma rays hitting the cpu, but i struggle to find it engaging to actually code something up at home, code or not usually i'm kind of the same at home as I am at work--i'll dawdle along slowly but eventually--long as I can focus--something will click and I'll get eight hours of ok-to-good code done in like three then go eat a slice of pizza or something out of starvation usually
|
# ? Dec 18, 2018 19:22 |
|
our (ex) offshore dev's ghost continues to haunt our codebase, today there was an issue where records bypassed the checks applied before changing state and guess what, turns out that rather than use the standard methods or procedures that embed all the logical checks they had * written the whole servers side methods by copy and pasting from other methods so there were unused or irrelevant variables everywhere *data tables everywhere. why store a list of concrete objects when you can store an anonymous data blob and manually cast every value when you need it? the casting code was c&p'd 3 separate times *passed every single loving thing from the controller to the view via Viewbag or user session with illuminating names like "path" (there were no paths used...) * loaded posted files into the user session as objects then never used them ever again *wrote a new set of database functions and procs that copy and pasted from the existing ones but also hosed it up. These immediately became out of date so don't handle any case added since. they also took every input as a comma separated string of up to 8000 characters (inexplicably checked for length <7500 elsewhere) because loops are hard apparently. *rather than use the existing update procs just yolo'd in direct table updates which bypassed the rest of the checks and hosed up more data *this is my favourite: performed every single logical test by returning a magic string from the db and checking its value, not even just "true" or whatever but poo poo like if(caniDoIt = "yes you can go ahead") it takes loving effort to be this bad and I wish I was a moron so I wouldn't care
|
# ? Dec 18, 2018 19:33 |
|
Powerful Two-Hander posted:*this is my favourite: performed every single logical test by returning a magic string from the db and checking its value, not even just "true" or whatever but poo poo like if(caniDoIt = "yes you can go ahead") absolutely loving genius
|
# ? Dec 18, 2018 19:47 |
|
Powerful Two-Hander posted:if(caniDoIt = "yes you can go ahead") fuckin lol
|
# ? Dec 18, 2018 19:48 |
|
|
# ? Oct 13, 2024 01:16 |
|
Powerful Two-Hander posted:if(caniDoIt = "yes you can go ahead") gonna steal this
|
# ? Dec 18, 2018 19:54 |