[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 353
Thread images: 39

File: froggu_dpt.png (443KB, 1118x1036px) Image search: [Google]
froggu_dpt.png
443KB, 1118x1036px
Froggu edition

What are you workin on, /g/?

Previous thread: >>56815638
>>
how do I into portable code with C?
>>
File: output2.webm (3MB, 250x444px) Image search: [Google]
output2.webm
3MB, 250x444px
r8 my game /g/, it has a boss now!
>>
>>56819185
Fuck off OP, you posted this thread far too early
Is every fucking frogposter this retarded?
Why did I even fucking ask
>>
File: 12 Rays 100 AA.png (1MB, 1920x1080px) Image search: [Google]
12 Rays 100 AA.png
1MB, 1920x1080px
I do some ray tracing in C++ but I struggle with refractions...
>>
Writing a forum in pure procedural PHP
>>
File: IMG_0079.jpg (68KB, 643x546px) Image search: [Google]
IMG_0079.jpg
68KB, 643x546px
>>56819193
> early
> previous thread has 301 posts already
fucking kill you're self, fag
>>
>>56819206
Bump limit is at 310 you absolute fucking retard, now abandon this thread
>>
>>56819210
why don't you go bump the previous thread by yourself then since you're a fucking bitch?
>>
>>56819198
looks cute anon!
>>
>>56819203
>pure
>PHP
>>
>>56819247
>pure
>ur waifu
>>
>>56819203
Why would you use PHP for anything other than maintaining legacy software?
>>
>>56819186
I like it, but it isn't JUICY ENOUGH
>>
File: [].png (11KB, 738x143px) Image search: [Google]
[].png
11KB, 738x143px
>>56819257
u'r*
>>
File: pizza~.png (2MB, 1920x1080px) Image search: [Google]
pizza~.png
2MB, 1920x1080px
warning: array subscript has type ‘char’ [-Wchar-subscripts]
...
#define escapecode_lut(c) escape_lut[(unsigned char) (c)]


Is it wrong to write C macros for the express purpose of getting rid of compiler warnings?
>>
>>56819260
because the alternative are ruby,python, and node
>>56819269
you're*
>>
>>56819270
If the compiler doesn't warn you when you compile your program, then there's nothing wrong with your program.
>>
It's 1:22am and I'm starving ): Should I order delivery?
>>
reminder that you're a pajeet or normie tier codemonkey if you use a debugger to step through code
>>
>>56819317
I use printf debugging, does that count?
>>
>>56819320
mental+printf debugging is how you should do it
>>
>>56819317
I prove my code before I implement it, does that count?
>>
>>56819345
yes

writing the code properly in the first place > using a debugger to try to band-aid crappy code
>>
File: 7.jpg (242KB, 1600x1000px) Image search: [Google]
7.jpg
242KB, 1600x1000px
>>56819162
Any php fags point my in a good direction on doing PHP on linux?
>>
>>56819367
I can but you must persuade me
>>
Currently Trying to figure out how to manage game states in spples. At the moment I have:
class GameStateManager {
// ...
public:
void Run(); // Does main loop, manages frame rate and tick rate. Calls Update and Render of the current GameState
void SetGameState( GameState *nextState );
GameStateManager& GetInstance() { return instance; }

private:
static GameStateManager instance;
GameStateManager() : currentState( nullptr ) {};
GameState *currentState;
}


class SomeGameState : public GameState
{
// ...
public:
void Render( RenderTarget& rt ) override;
void Update() override;
SomeGameState& GetInstance() { return instance; }

private:
static SomeGameState instance;
}


And I feel extremely Indian becuase it looks like something an """OOP expert""" would do in Java (everything's a fucking singleton!). This is poo. Then again, how else to do it? Having to instantiate GameStateManager or GameState derivates locally seems impractical, since GameStates must be able to transition to other GameStates:
void MyGameState::Update()
{
// ...
if (health <= 0) {
GameStateManager::GetInstance().SetGameState( GameOverState::GetInstance() )
}
}


One alternative I found is to save all possible states into a map inside the GameStateManager at initialization time, so they can be switchen via something like
GameStateManager::GetInstance().SetGameState("GameOverState")
-- so that's the GameState singleton gone. It's still shitty though, since having a hash map inside the manager just to save the states seems extremely wasteful and horrible to refactor, in case I want to rename a game state, or I make a new state and forget to add it to the map or something.

(Or is this maybe one of these very few and far between cases where singletons are okay? plsnobully)
>>
>>56819285

Just use Node. It's faster than PHP, and Javascript, while rather shitty, is less shitty than PHP.
>>
>>56819403
Yeah, I've been going thru benchmarks, I was put in my place I guess. Still I'll try to do it with least libraries. Thanks bby x
>>
>>56819403
>while rather shitty, is less shitty than PHP.

I'm trying to come up with an analogy to it being infinitely shitty, but less shitty than an infinitely shitty alternative.
>>
>>56819395
>Health a part of SomeGameState
Make it a separate object, in fact, make all of the state encapsulated by the GameState a separate object.

You could call it a component.
>>
>>56819300
please be baiting
>>
>>56819451

PHP shittiness is like ω^ω
JS shittiness is like ω^k for some arbitrary finite, but sufficiently large k (for instance, k = Graham's number might be a rough approximation)
>>
https://www.youtube.com/watch?v=j84pZM840eI#t=20m45s
>>
What language should I learn if I need to make a little money fast.

JS?
>>
>>56819552
good luck with that
>>
How do I initialize an extern multidimensional vector declaration?
extern std::vector< std::vector<MapData> > mapData(std::vector<MapData>);


I'm trying whit this but I get error: ‘std::vector<std::vector<MapData> > mapData’ redeclared as different kind of symbol
std::vector< std::vector<MapData> > mapData(MAP_X+1, std::vector<MapData>(MAP_Y+1));
>>
>>56819552
Java
>>
>>56819459
>Health a part of SomeGameState
Just a flawed example. I wanted to show that the current game state can be changed from really anywhere.

>make all of the state encapsulated by the GameState a separate object
>You could call it a component
Indeed I'm working on a component-based game engine, becuase any other architecture is just doomed to fail at some level of complexity. However, this won't solve my "problem" of managing different game states in a potentially subpar way. For example, I'd still need different states, one for rendering and updating the main menu, one for the "actual game", one when the game is over etc. or nah?

>>56819552
>What language should I learn if I need to make a little money fast.
Well, there is always some company looking for Java devs...
>>
>>56819597
without seeing both the file where its defined and the file where its declared i cant say, however i believe what you're doing is declaring it a 2nd time.

normally you define a variable in someFile.cpp
int foo = 42; 


and then in anotherFile.cpp
extern int foo;

void bar(){
std::cout << "foo: " << foo << std::endl;
}


note that you dont initialize it again, you just declare it in other files using the extern specifier
>>
>>56819395
>refactor
you shouldn't have more than a few game states like pause/playing/intro(when booting the game)
>>
>>56819643
I think that I found the solution, it's supposed to be declared like this:
extern std::vector< std::vector<MapData> > mapData;
>>
>>56819668
youre right. i should have paid closer attention.

when you declare a symbol as extern, you should NOT be passing it constructor arguments. it has already been constructed in whatever file it was defined.
>>
>>56819317
t. someone who never worked on a project bigger than his micropenis
>>
>>56819686
Responding to bait is a shitpost, too.
>>
File: Anzu10.jpg (83KB, 500x501px) Image search: [Google]
Anzu10.jpg
83KB, 500x501px
So I heard that the reason for the dominance of C and C++ is due to the amount of boomers in the industry.

And that employers actually want young employees to know new languages, like Ruby and Ruby on Rails.

But I have yet to find a single "Junior Ruby developer" position in my field.
>>
>>56819686
t. pajeet who doesn't know loose coupling and encapsulation
>>
>>56819697
The reason is that C/C++ is the default language when it comes to a lot of lower level things, e.g. all Engineers use it or at least learn it.
If it were for boomers we would all program in COBOL and Pascal.
>>
>>56819697
C/C++ is not "dominant" in jobs.

Java has the most by a large margin. C# is the next highest, well above C/C++/Python which are about the same.

Javascript is essentially ubiquitous, as is SQL.

Ruby really doesn't have many jobs in comparison to any of these.
>>
>>56819722
That only works 100% in an ideal world.
In real world someone else makes mistakes(or even just changes) in his code that dont affect him and you will cry on /g/ why your code dosent work while analyzing your code for weeks until the other guy fixes the problem.
>>
>>56819775
ok rajeesh
>>
>>56819780
Well maybe someday you will get a job
>>
>>56819788
let's face it, you're a codemonkey
>>
>>56819794
At least he has a job
>>
>>56819722
>>56819775
>>56819780
>>56819788
>>56819794
Holy shit, fuck off retards.

Why do either of you think this conversation is going to go anywhere?
>>
>>56819797
a job as a codemonkey
>>
since when is this thread /b/
>>
>>56819814
Himegoto
>>
>>56819806
is still better than a wannabe something, cant-be-anything-so-im-shitposting-in-wdg
>>
so a good programmer should learn

>C
>HTML/CSS
>PHP
>SQL

right?
>>
>>56819872
>HTML/CSS
>PHP
No.
>SQL
Only if you're working with databases.
>>
>>56819206
>>56819210
even then that'd be too early
new threads should be made at bump limit AND page 10
perfect score if you do manage to kill the old thread when making the new one
>>
>>56819872
Not categorically right, no.

There are good programmers that don't know any of those languages.

There are horrible programmers that can use all of those.

You should figure out what you want to program, and select languages that suit those needs and compliment each other.
>>
>>56819887
>>HTML/CSS
>>PHP
>No

HTML/CSS should be included in every "junior developer starting pack", together with Javascript.
You do need some webbased stuff.
>>
>>56819902
Webdev shit has absolutely nothing to do with being a good programmer.
>>
>>56819908
a lot with being an employable programmer
>>
>>56819924
No, it only has to do with being an employable webdev code monkey.
>>
not using a debugger for everything actually helps with improving your ability to read and understand code
especially when you start dealing with concurrency this ability is invaluable, because a debugger won't help you
>>
>>56819186
change the fucking font bitch
>>
>>56819908
>not following the trends of using html/css/js for user interface layouts
>not knowing that tons of applications already use markup languages
>not knowing how to interop with webservices.
oh anon please
>>
>>56819902
>>56819924
I'm gainfully employed in a software development role and I've never touched JS, HTML, or CSS.

That being said, knowing these things absolutely does open up a massive swath of job opportunities, but they really aren't necessary.

>>56820157
"webservices" is vague. What exactly are you trying to say with that?

If you're referring to APIs, then you certainly don't need any of those to interface with them.
>>
what are the essential c++ libraries to learn?
does someone have a link?
>>
>>56820615
the standard ones
>>
>>56819162
Rust or Nim-lang?
>>
>>56819270
>>56819300
even if the program itsef doesn' work?
>>
>>56820653
Rust is stable, nim is still in beta
>>
>>56819826
>wdg
lmao web shitter
>>
What is /dpt/'s opinions of Go and Dart ?

Please no memes, only serious responses.

No "Dart is dead LOL" because you read it someplace

Reply only if you look at the language
>>
File: 1473842052537.gif (2MB, 500x500px) Image search: [Google]
1473842052537.gif
2MB, 500x500px
>>56819186
brutty gute
>>
>>56820820
I've never even heard of Dart.
>>
File: cross.webm (3MB, 480x270px) Image search: [Google]
cross.webm
3MB, 480x270px
/dpt/-chan, daisuki ( *’ω’* )

>>56820820
>go

Go Go:                         33.553163084 seconds time elapsed
Go gccgo: 17.438276362 seconds time elapsed
Dart: 2.585097637 seconds time elapsed
Haskell GHC: 0.454930841 seconds time elapsed
Java OpenJDK: 1.189619693 seconds time elapsed


http://qr.ae/drvVS
http://qr.ae/drvm8
http://yager.io/programming/go.html
http://nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
http://java.dzone.com/news/i-don%E2%80%99t-much-get-go
http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
http://www.lessonsoffailure.com/software/google-go-not-getting-us-anywhere/
http://www.lessonsoffailure.com/software/googles-go-not-getting-us-anywhere-part-2/
http://www.lessonsoffailure.com/software/google-go-good-for-nothing/
https://gist.github.com/kachayev/21e7fe149bc5ae0bd878

>>56820653
Neither.

>>56820615
Boost and Qt.

>>56819872
Yes.

>>56819750
>C# is the next highest, well above C/C++/Python which are about the same.
http://blog.edx.org/the-3-most-lucrative-programming-skills-you-can-learn-online-for-free

>>56819395
Use a factory.

>>56819345
>does that count?
No, Dijkstra died years ago.

>>56819317
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?

>>56819285
>because the alternative are ruby,python, and node
ClojureScript

>>56819203
>procedural PHP
https://en.wikipedia.org/wiki/Pleonasm

>>56819198
>Not a raytracer for DOS, in 16 VGA colors

>>56819193
>>56819210
Please, don't bully.

>>56819186
Not enough projectiles for a danmaku.

>>56819185
By writing strictly conforming programs but good luck with that.

>>56819162
Please use an anime image next time.
>>
File: polygon_rotation.png (44KB, 1025x684px) Image search: [Google]
polygon_rotation.png
44KB, 1025x684px
HELP what is wrong with my approach to rotating polygons
It's not working atm
>>
File: NW0mK39.gif (114KB, 800x336px) Image search: [Google]
NW0mK39.gif
114KB, 800x336px
Retard here,stuck on two things, any examples/help would be appreciated. I'm trying to use a class simply as an entry point, then a second class performing the task. My problem is, when I'm running the first class, nothing happens. Running the second class by itself works fine.
First class:
 
public class ModuloEntryPoint {

public static void main(String[] args) {
new ModuloPrint();

}

}


Second class:
public class ModuloPrint {

public static void main(String[] args) {

for (int i=1;i<=70;i++) if (i % 5 == 0) System.out.print(" "+i);
System.out.println();
}

}

Also, is there a way for me to print the modulo loop using something like System.out.print(moduloLoop()) instead of having the "for int" before the print?
>>
>>56820854
Thanks for the informative reply.
>>
>>56820917
do you expect anyone to decypher this image
>>
>>56820917
https://en.wikipedia.org/wiki/Rotation_matrix
>>
>>56820928
In your second class use a constructor rather than two mains. That's when it's instantiated.
>>
>>56820928
>>56820975
As in, call a method or use that for loop in the constructor. Right now the class you're running is the entry poiint, and obviously simply instantiating the second class from the first does nothing.

You could put the loop into a method and call new ModuloPrint().method();
>>
>>56820932
Obviously what I know of isn't the indicator of a language's popularity, but I've been frequenting /dpt/ for over 3 years now.
Hopefully that gives you a context for how little it's discussed here, if it's ever been discussed at all.
>>
>>56819887
You should be able to work with databases though, just like you should know about data structures
>>
>>56820975
>>56820996
Thanks
>>
>>56821001
that's completely wrong, you only need to be able to work with databases if you're gonna work with databases
>>
File: 1474647385808.jpg (92KB, 500x376px) Image search: [Google]
1474647385808.jpg
92KB, 500x376px
>>56819186
>fucking ads
>>
>>56821057
android poorfags don't pay for games
>>
>>56821020
And sooner or later you'll end up working with databases, data structures or some other form or Model.

Saying you're never going to work with databases is like saying you're never going to work with trees, and do everything through arrays
>>
>>56821078
idiot
>>
>>56819872
you need to know much more than that if you want to develop on the full stack lol

>>56819162
rate-limiting mysql users and tuning the nginx rate limiter; where is the networking thread???
>>
>>56819367
install apache and php and mysql
>>
>>56821085
baka
>>
c++ method returns shared pointer.
How would you wrap it to be used in C?
>>
>>56821123
>>>/g/wdg
>>
php isn't so bad you can write html directly into it!
>>
File: 31187.png (120KB, 316x320px) Image search: [Google]
31187.png
120KB, 316x320px
>>56819186
Everything but the explosions look good. Change that shit ASAP.
>>
File: 20739.gif (1MB, 392x400px) Image search: [Google]
20739.gif
1MB, 392x400px
>>56819308
Make a Totino's Party Pizza™ instead family (^:
>>
>>56820820
i've been playing with go for the last week. i like it despite having run into frustration -- there's a lot of language stuff you expect that isn't there. a lot of this is to do with the lack of generics, i think

but i haven't done anything substantial with it. ask me in a month

>>56820917
you might try /sci/. if i have time later i'll say something
>>
I need one of you wizzes to code up a way to save screen brightness levels in linux from a previous boot. Or carefully explain to me how the fuck I can grab the only line from a file and stick it in another file, because all of my bash scripts have done absolutely nothing in that regard
>>
>>56821245
cat file1 > file2

if you want just the first line use
head -n1 file1 > file2
>>
>>56820210
>vague
true, i was mostly referring to SOAP.
ive found that i needed to read up on it when i needed to look into automatic port remapping on NATs, more specifically IGD and SSDP. i havent found any useful APIs that abstract away the underlying message structures, so for those uses its good to have the knowledge
>>
What are some good emulators/simulators for learning MIPS or ARM assembly?
I'm mainly looking to learn to understand things like the workings of machine cycles, instructions vis a vis clock speed, registers, jumps, I/O controllers, device drivers etc.
>>
Does anyone here code on their smartphone? I was wondering if coding on the go is a thing
>>
how does webdev shit exactly work?

you run a java* backend which does what exactly? isnt everything on the frontend javascript anyway? how does that play together?

*I like it. deal with it.
>>
PHP:
I have an array of various objects and I want to break it apart into several arrays of unique objects.

Is there a better way other than to use array_filter and check using instanceof?
>>
>>56821288
i'm also interested in this
>>
>>56821288
contrary to x86, most of the stuffs (tools, documentation, ...) around arm is not free.

i would say QEMU is the best free emulator for arm.
>>
>>56821380
https://en.wikipedia.org/wiki/WebSocket
>>
I finally got cinnameg working you guys

cinnameg is literally the future of programming, give me 1 flaw in it
>>
Why are there no good build systems suitable for multi-module C/C++ projects that enable easy cross-compilation?
>>
>>56821525
>Currently only a Unix/Linux version is available. A Windows implementation will be made available later.

Also, I have one question.

Does it support higher-kinded types?
>>
>>56821367
it's more of a last resort, when i don't have an ipad around; i use the ipad when i don't have my laptop
>>
strcpy((char*)out, result.c_str());


using above line of code results in an error in Visual Studio stating strcpy might be unsafe and that i should consider using strcpy_s. but strcpy_s doesn't allow me to use the arguments ive given.

i know i can go into project settings to tell the compiler to ignore the warning, but i just want to know why i cant use strcpy_s.
>>
How can I average two strings in C?
>>
>>56821605
How would you compare productivity ona touch screen compared to a keyboard?
Also what editor/IDE do you use?
>>
>>56821397
i think you can just use is_a
>>
>>56821380
>you run a java* backend which does what exactly?
>isnt everything on the frontend javascript anyway?
are you trolling?? when you log in w/user credentials, where do you think that data goes? when you click on the "About Us" link, where do you think the "About Us" page loads from??
>>
>>56821616
Why not strncpy?
>>
>>56821605
which apps do you use? i sometimes use an ssh client for quick fixes but wouldn't dare do more

>>56821620
what do you mean by that?
>>
>>56821636
Javascript
>>
>>56821651
Like how you can average two signals. Well a discretized signal is just a sequence, and a string is just a sequence too.
>>
>>56821627
i never use the touchscreen beyond launching the ssh client, i have a bluetooth keyboard for my phone and ipad -- and i use vim
>>
Javascript shitter coming through, don't get my filth on you as I ask this peasant-tier question:

Express.js question:

I want to do nested iteration in the pug template engine (formerly known as jade).

I have an array of objects. Each object within that array contains an array of objects. I want to render a specific property from each nested array to the screen. I think my code is correct, and yet nothing is happening. It's not throwing an error, it just doesn't render anything in the div these properties will be inserted into.

- var i = 0
while i < outerArr.length
- var j = 0
while j < outerArr[i].length
.col-xs-12.text-center
span #{outerArr[i].innerArr[j].someProp}
- j++
- i++
>>
>>56821666
...what?
>>
>>56821644
isnt it just the same as strcpy but you pass the number of characters you want copied? VS calls that "unsafe" as well.

anyway that's not my problem, i want to know why i can't use strcpy_s and when using strcpy might be bad.
>>
>>56821676
We don't actually know Javascript.

>>>/g/wdg
>>>/vg/agdg
>>
>>56821676
is your formatting fucked up? what's with the dashes?
as written it looks like that inner while loop will just go forever
>>
>>56821676
lol what the heck is this language how do you even read that
>>
File: Weinen uezs.png (18KB, 576x422px) Image search: [Google]
Weinen uezs.png
18KB, 576x422px
>>56819162
I am so much used to C++ and dont wanna learn Java, but all these Pajeet jobs require iiiit ;___;
>>
>>56821651
>which apps do you use? i sometimes use an ssh client for quick fixes but wouldn't dare do more
see >>56821671 lol, you are literally speaking my language lol
>>
>>56821750
>I am so much used to C++
Doubtful
>>
>>56821750
>C++

java might be a little complicated for you. you should probably dedicated at least a year or two to learn it.
>>
>>56821750
>I am so much
Pajeet fuck off ok
>>
File: graduate.png (76KB, 413x426px) Image search: [Google]
graduate.png
76KB, 413x426px
>>56821709
>>56821676
We do know javascript, but that thing sure as hell ain't javascript
Also:
>using while loops where it's obviusly a place for a for loop
>pic related
>>
>>56821676
Here's a weird thing:

I tried reformatting it to use a for loop instead of a while loop. It works to a certain extent. I could print outerArr[i] to the screen. However, if I attempt to access a property on the currently iterated object (e.g. outerArr[i].username), it throws an error: "cannot read property "username" of undefined". Which is nonsense, because it was defined just a second ago.

I dunno why this is such a pain in the ass to get right.

>>56821724
No, the formatting is fine, there is an issue with the way the nesting is copy-pasted in my post, but it's perfect in the editor. The dashes delineate markup from interpolated js.

The inner while loop will terminate.

>>56821739
A mix of javascript and a templating engine (pug/jade).
>>
So /g/ is racist to Pajeets?

So it is literally /pol/ (Hitler?)
>>
>>56821802
while loops are recommended above for loops by the creators of this specific template engine. I typically never use while loops myself.
>>
>>56821802
I don't know Javascript and I don't want to know Javascript. Why do I know this? I know Javascript.
>>
>>56821814
We don't like employers shipping in foreign workers and using them to undercut American workers (because the foreign workers can't quit without facing deportation).
>>
>>56821817
That's some weird templating engine you use.
Why not use the popular choices like angular or react?
I know they are more than templating engines but still..
>>
>>56821837
does that happen often in america?
>>
>>56821853
Depends on what you mean by "often".
>>
>>56821853
About 65000 times a year.
>>
>>56821837
and this is why, when I graduate in a year, I will look for jobs at small to medium sized lesser-known companies away from huge cities. I really don't want to work with / compete with pajeet.

I'm perfectly content with 60k a year.
>>
>>56821873
well, is it an usual experience for a junior software developer? something he has to actively consider when bargaining for a wage, for example, that the employer could bring in pajeet anytime?
>>
which programming language or library is known for having the largest amount of bloat, crap and unnecessary features in general?
>>
>>56821934
sepples
>>
>>56821896
racist

I guess you're just not good enough at programming huh
>>
>>56821934
Any Lisp
>>
>>56821934
STL
>>
>>56821964
calm down, pajeet
>>
File: kurisu62.png (901KB, 984x1361px) Image search: [Google]
kurisu62.png
901KB, 984x1361px
>tfw you start to get Prolog
>>
>>56821975
I'm not Pajeet.
>>
>>56821934
Lambda calculus
>>
File: hey mom let me die.jpg (55KB, 600x628px) Image search: [Google]
hey mom let me die.jpg
55KB, 600x628px
how do i git gud at programming if i suck at math
>>
File: jultårta5.jpg (225KB, 1280x1539px) Image search: [Google]
jultårta5.jpg
225KB, 1280x1539px
>>56822021
Learn Javascript and become the king of the shitpile
>>
>>56821934
>largest amount of bloat, crap and unnecessary features
C++ easily. Both in terms of language and libraries.
The new shit their committee adds every year is basically a running joke at this point. (and before them C++ was actually a relatively lightweight language)
>>
>>56822021
git gud at math
>>
>>56822067
lightweight may also be a synonym for "lacking many convenient features"

life was not all that fun before STL and C++11, you know
>>
>>56822040
sauce
>>
>>56822021
>git: 'gud' is not a git command. See 'git --help'.
Well i guess you can't then
>>
>>56822096
Life still isn't fun for the C++ programmer.
>>
File: akari3.jpg (92KB, 912x576px) Image search: [Google]
akari3.jpg
92KB, 912x576px
akari-bbs rev. 13 is now live!
http://akaribbs.mooo.com/

Just a backend update, mostly to fix an issue where you could defeat the whitespace filter by putting spam between 2 pairs of left and right code tags.
>>
>>56822096
>"lacking many convenient features"
Like a compile time over the two hour mark. :^)
>>
>>56822110
just add an alias to your .gitconfig and you're golden.
>>
File: Hängen.png (440KB, 645x1260px) Image search: [Google]
Hängen.png
440KB, 645x1260px
>>56822120
life is not fun for people that are seriously into programming, anyways
>>
i like ruby a lot, but it is pretty useless.
still learn? maybe there will be less competition for jobs.
>>
>>56822021
lol at best you'll be a delusional codemonkey if you're too retarded to not suck at math
>>
>>56822128
It doesn't show time zone adjusted dates like 4chan does.
>>
File: toosmart.png (6KB, 195x259px) Image search: [Google]
toosmart.png
6KB, 195x259px
>tfw too smart for bothering with Java
>>
>>56820820
All the criticism of go is just people re-hashing the same shit over and over again (see pic)
>>
>>56821583
>Does it support higher-kinded types?

That's actually what I was memeing about last night.

No, it does not support HKTs.
>>
>>56822224
you are two smart too live

i suggest killing yourself
>>
File: java-fullpage.png (759KB, 1224x4524px) Image search: [Google]
java-fullpage.png
759KB, 1224x4524px
>>56820820
Now look at the criticism of the alternative to go, Java
>>
>>56821696
>i want to know why i can't use strcpy_s
AFAIK there are 2 variants of that function. One that takes a statically allocated string (as in
char str[1024];
, and one with 3 parameters, where the second parameter is the length of the destination string. Since you don't appear to be using statically allocated string, maybe you used the wrong overload. Have you tried
strcpy_s(out, out_length, result.c_str());
? (Note that you'll need to know the size of 'out')

If you'tr one hundred percent sure that all you do is safe all the time, you could
#define _CRT_SECURE_NO_WARNINGS
to silence the warnings.

>when using strcpy might be bad
When you don't know the size of your destination string, and you blindly strcpy into it. That's bad because the source string might be longer than the memory block the destination string was allocated for.
>>
File: cpp-fullpage.png (606KB, 1224x4152px) Image search: [Google]
cpp-fullpage.png
606KB, 1224x4152px
>>56820820
Now lets look at C++, I think it's pretty clear that Go is best language between the three.
>>
Isn't strcpy_s literally memcpy?
>>
>>56822268
>>56822255
>>56822240
Or least popular
>>
>>56822106
>needing source for Oregairu
wew
>>
>>56821934
C++, Java, Rust
>>
>>56822282
Java and C++ devs feel emasculated by go.
>>
>>56821676
Nevermind, I fixed it
>>
>Bourg, D.M. & Seemann, G. (2004) AI for Game Developers, O’Reilly
>Braitenberg V, Vehicles Experiments in Synthetic Psychology, 1986, MIT Press, USA
>Russell, S.J. & Norvig, P. (2003) Artificial Intelligence: A Modern Approach, 2/e
which one, /dpt/?
>>
>>56822255
>2.1bn elements is too small of an array

People who think this is a legitimate argument can fuck off.
>>
File: 22973772255_7a3955c621_k.jpg (788KB, 2048x1298px) Image search: [Google]
22973772255_7a3955c621_k.jpg
788KB, 2048x1298px
>>56822319
word go is for alphas only
>>
>>56822343
It's not good for science bro
>>
>>56822339
Artificial Intelligence: A Modern Approach 3e
>>
>>56822339
artificial intelligence by patrick henry winston
>>
>>56822351

Science shmience. Don't load all your data at once.
>>
>>56822298
Java? How so?
>>
>>56822359
>>56822368
why in particular?
>>
>>56822351
Java doesn't have to be a language that fits every usecase.

>>56822343
The point about large files in memory (byte arrays) is valid tho.
>>
>>56822397
>Java doesn't have to be a language that fits every usecase.
It certainly tries to, looking at its standard library.
>>
>>56822394
patrick winston is a really smart mit professor and i think his book is nice

i believe patrick winston's book is a little shorter than the more popular AI a modern approach

either way, it doesnt matter too much which book you pick up
>>
File: rob.pike.jpg (19KB, 500x335px) Image search: [Google]
rob.pike.jpg
19KB, 500x335px
>>56822349
>>
How come I can't do bank transfers of the weekend?

How can I access the international banking API to code my own solution for doing transactions on holidays and the weekends?
>>
>>56822386
Java as a language is fine, but the standard library contains shitloads of bloat and redundancy.
>>
How do i stop being an OOP cuck, /dpt/?
What design paradigm should i learn to replace OOP with?
>>
>>56822411
and yet ironically it's missing a bunch of the features that would make it actually useful
>>
>>56822484
>How do i stop being an OOP cuck, /dpt/?
learn assembly
>>
>>56822298
Why Rust?
>>
>>56822466
lol, I thought you would argue otherwise.
Can you please elaborate?
I think java standard library is very good, clean and really well documented
>>
>>56822484
OOP is important, what you want is a language that is both object oriented and functional. I would suggest JavaScript or Go.
>>
>>56822493
Are you serious?
>>
>>56822541
javascript is not a programming language
>>
>>56822484
nice meme

learn functional programming :^):^):^)
>>
File: 1474832060937.png (29KB, 250x226px) Image search: [Google]
1474832060937.png
29KB, 250x226px
>>56822569
Yes, it is.

It's actually one of the best out there.

Go > D > Rust > JavaScript > C > C++ > C# > Java
>>
>>56822541
Fuck off. Language choice is largely irrelevant. I'm talking about design paradigms, not language
>>
>>56822599
Ebin
>>
>>56822599
jajajaja
>>
>>56822599
>C# > Java
>Bill Gates one platform botnet > 3 billion devices
>>
File: shinobu22.png (1MB, 495x750px) Image search: [Google]
shinobu22.png
1MB, 495x750px
>>56822484
Learn declarative programming
>>
>>56822599
C++ > Java > C# > C > D > Rust > Go > JavaScript > Python > Haskell
>>
>>56822484
lean programming
>>
>>56822531
Don't have a list written down so here are some from top of my head:
>Three different UI platforms
>Most common collections have a second, outdated variant
>Two different enumeration classes
>Two date classes and neither of them is good
Also there's the fact that it tries to have a standard class for every single use case. I don't think that is bad by itself but some people hate it.

>>56822484
If you're not memeing then learn some C.
>>
>>56822644
D > C++
>>
>>56822644
>javascript so far down

You don't understand the language.
>>
>>56822552
Yes and no.
If you want to find out more about why OOP is terrible in many situations and you want to explore alternatives, then there are better ways to do so.
If you want to completely throw every kind of paradigm overboard and want to learn how programs work at the lowest level, then yes (if you don't mind spending one afternoon or another debugging a singgle function occasionally). At times I find assembly quite fun, since I learned a lot just about how things really work, and it definitely made me value performance optimization a lot.
>>
File: 1440931658504.gif (432KB, 274x200px) Image search: [Google]
1440931658504.gif
432KB, 274x200px
>>56822644
>Java > D
>>
>>56822649
You can just fuck off as well.
>>
>>56822685
Javascript is a mess and the only reason it is popular is because browsers don't support anything else. It might be common and thus often supported but from language design point of view it is a big pile of dogshit.
>>
>>56822242
Wasn't here last night, but I'm glad you're seeing the light. HKTs are the next level of code reusability above first-order generics.
>>
File: 1468472224634.jpg (61KB, 990x557px) Image search: [Google]
1468472224634.jpg
61KB, 990x557px
>>56822724
>>
>>56822724
>I'm glad you're seeing the light.

I hadn't before? What are you implying, buddy?
>>
>>56822614
Language choice is extremely relevant. A poor language will actively frustrate you and prevent you from using abstractions and writing generic code.

Currently writing C and string manipulation is so tedious it's driving me mad.
>>
>>56822723
>tfw no Lisp-1 language instead of Javascript
>>
>>56822723
It's not really that bad.
>>
>>56822736
Every time I've seen you before, you've been shilling for C# and lambasting FP and its ideas as not useful.
>>
>>56822743
I bet you're a really bad programmer.
>>
>>56822751
Yes it is. It can't even get scoping right.

>>56822731
>le no-argument tiptip
>>
>>56822755

I like C#, but I haven't earnestly suggested that FP is useless for a few years, now.
>>
>>56822764
A person who doesn't understand why language choice matters is more likely than not a bad programmer.

>yuo can of use ptyhon or cobol ro seahash fro thsi projcet
>le chose coblo bcuz lenguaje choize dunt mattr!
>>
>>56822649
Literally all of your points state that you have a choice of two or more things for a certain use case.
And all of them are resolved by just using the newer one.
>Three different UI platforms
yeah, that might actually be a little issue because a lot of people use swing, but JavaFX is very good.
>Most common collections have a second, outdated variant
What?
>Two different enumeration classes
What??
>Two date classes and neither of them is good
What two date classes?
The standard now is Java 8 java.time API, which is inspired by Joda Time, and is very good, and clean. The Date class I think is deprecated or most of its methods are.
>>
>>56822484
>What design paradigm should i learn to replace OOP with?
Not relying on "design paradigms" as crutches in the first place and actually thinking about the problem and the solution without trying to shove them into a dogma.
>>
>>56822695
I actually would like to go deeper and learn assembly some time in the future, but right now i don't have the time, patience nor motivation.
But that's not my issue.

When i started programming they quickly started oop into us, an now i've gotten to a point where every problem i try to tackle looks lika a class diagram in my head. I can't even think if i can't wrap things in a class. It's become ridiculous, and i need to break out of that mindset somehow.
>>
So I learned ALL the basics there are to C++, as my first serious language.

What is next? Should I learn the Java and HTML basics, or should I go DEEP into C++?
>>
>>56822835
I couldn't possibly recommend alcoholism to dull the pain. Not at all.
>>
>>56822817
see
>>56822835

Your advice is entirely true and equally unhelpful.
>>
>>56822839
>So I learned ALL the basics there are to C++
And you'll still write code that's not exception-safe.
>>
>>56822860
Well, yeah, I never received any formal software engineering training, despite studying CS.

Nonetheless, I already wrote small tools in C++.

Should I move on or go really, really deep into one language before applying for entry-level jobs?
>>
>>56822839
What do you mean by "basics"?
>>
You guys are such langcucks, /dpt/.
>>
>>56822860
>>56822891
y = -x;
>>
>>56822894
Basically all the core language.

If I want to learn additional stuff, I would have to go into libraries.
>>
>>56822835
Watch Handmade Hero. The bullshit of "OOP", particularly as espoused by C++ (start with objects and orientate code around them), isn't the focus but occasionally he gives it a logical thrashing and explains why he considers it shit for design flexibility and performance.
>>
>>56822839
not sure what you mean by the basics

but learn java too
>>
>>56822924
have you learned standard library stuff? threading? OOP?
>>
>>56822927
his game looks like shit
>>
Can someone explain me the point of universal/isomorphic web apps?
We render the page on server. We dehydrate app and pass the initial state along with html markup. Then a browser renders the markup, but immediately after browser is done with rendering, react app rehydrates and re-renders everything once again.
What's the point of sending the server-rendered markup if it is immediately replaced?
>>
>>56822954
>OOP
Yes.
>Standard library stuff
Depends on what that is ... STL, Boost and Qt, I suppose?
>Threading
Nope, got it.
>>
>>56822970
>>>/g/wdg
>>
>>56822924
But do you mean in like collegecuck "I know the syntax" way, or the I'm comfortable with the language and I can pretty much do everything in it (not counting library knowlege), with good quality code?
If the first one then stay in C++ and you can learn those libraries if it helps you
If the second one, then it depends on what you want to write. If you want to write webapps learn python or java.
>>
>>56822811
>Most common collections have a second, outdated variant
Stack, Vector, Hashtable.
>Two different enumeration classes
Enumeration and Iterator.
>Two date classes and neither of them is good
Date and Calendar. Date a) is a wrapper for timestamp rathe than actual date and b) is very basic. Calendar tries to solve every use case with it's multiple time systems which makes it very confusing and heavy for most use cases and it still doesn't work for all date systems around the world.

Also there are some related classes which complicate it further like Instant, LocalTime, LocalDate, MonthDate etc.

>b-but they're deprecated
Yes, but that still isn't a valid excuse for keeping them in after all these years. JDK team really should start doing some spring cleaning in their APIs.

>>56822751
>core features like exceptions and oop are just thrown in to fill a checkbox with no planning for them
>doesnt support multithreading at all
>stupid casting rules
>if it encounters programmer mistake it'd rather output something stupid than give up and throw a proper error
>>
>>56822969
Not an argument!
>>
>>56822984
>implying that /wdg/ topics aren't a subset of /dpt/ topics
>>
File: wow.gif (493KB, 160x160px) Image search: [Google]
wow.gif
493KB, 160x160px
>>56822969
His game's design and look isn't important, the stream is about the architecture and coding process, explaining the reason of everything underlying it, and that part is pure craftmanship.
>>
>>56823004
those who can, do; those who can't, teach
>>
>>56822927
>The bullshit of "OOP", particularly as espoused by C++ (start with objects and orientate code around them), isn't the focus but occasionally he gives it a logical thrashing and explains why he considers it shit for design flexibility and performance.

He's a fag and his game sucks.
>>
>>56822743
Language choice is important. So i exercising and eating right.

But none of those things are relevant.
>>
>>56822626
sincerely hope this is a joke
C# is much better than Java, not to mention
>C# compiler is open source
>.NET Core is open source and runs on Windows/Linux/Mac
>Mono runs on the above plus iOS/Android/WinPhone/PS4/XB1 and more
>>
>>56823017
dumb tripposter
>>
>>56823006
If he's implying that then he's correct
>>
>>56823017
What's wrong with it?
>>
>>56823013
He said as an anonymous user on an anonymous imageboard
>>
>>56823024
Just how fucking new are you? OSGTP has been here a lot longer than you, kid. Show some damn respect.
>>
>>56822993
>or the I'm comfortable with the language and I can pretty much do everything in it (not counting library knowlege)

Pretty much this.
But!
C++ without libraries is not that much, actually.
You cannot even make a GUI without libraries, so I guess truly "knowing" C++ includes knowing Qt.
>>
>>56823044
i cringed at this poost
>>
>>56823032
he can't make a good game and he hates OOP

really makes you think
>>
>>56823046
Sure you can. Just make the appropriate syscalls.
>>
Why is it that anti-OOP arguments are, well, actually arguments, while pro-OOP arguments are generally just attacks on the OOP critics or fallacious appeals to authority, tradition, etc.?

Surely the pro-OOP people must have some semblance of self-awareness and realize that they are defending something they don't know how to defend?
>>
>>56822970
You don't have to construct new web page for every visitor. This makes serverside stuff super simple which in return makes pages load much faster.

>but it takes longer to fully render because of all that javascript crap
True, but webdev programmers will never admit that javascript might be bad.
>>
>>56823058
>he hates OOP
He sounds reasonable to me
>>
>>56823064
(You)
>>
>>56823017
>>56823044
dumb sameposter
>>
>>56823055
OSGTP is /dpt/'s mummy. Who the fuck are you?
>>
>I came on /g/ and they said to hate OOP so now I hate OOP!

Was there ever a worse bandwagon? Even ardent prequel trilogy fags are not this bad.
>>
>>56823064
>>56823075
i think that still debating about the very concept of OOP, even actively "hating" on it in fucking 2016, when OOP languages make up over 50% of usage, is Tea Party-tier
>>
>>56823046
>"knowing" C++ includes knowing Qt.
No. Qt is whole different beast. Qt code is so fucking non-standard that they even need their own custom pre-compiler to get the code to work.
>>
>>56823099
>>56823077
>>56823101

These fucking arguments though
>>
>>56823064
The thing is that anti-OOP people just don't understand OOP. Look at any of Bjarne's comments. Try reading the GoF book and actually trying to understand why OOP enables you to do more than any other paradigm.

OOP cannot be bad. The huge number of systems written using OOP is an attestation to its great merit.
>>
>>56823101
t. Carl
>>
>>56823103
Yeah, but one is still left with few options in C++. If I want to move past the console application form.
>>
Haskell is a great language.
>>
>>56823127
>Try reading the GoF book and actually trying to understand why OOP enables you to do more than any other paradigm.
Ironic, because the GoF patterns are almost always things that are so trivial that they are not even worth noting if you are in a functional language.

>OOP cannot be bad.
If you consider OOP to be a tool to be used when appropriate instead of a paradigm. Under that definition, my argument is that OOP is almost always inappropriate. Same thing, really.
>>
File: 1424907758812.jpg (63KB, 722x349px) Image search: [Google]
1424907758812.jpg
63KB, 722x349px
>>56823099
>Was there ever a worse bandwagon?
Yes, OOP.
>they told the managers it would make programmers more easily replaceable so now we have to adopt these piece of shit languages that are basically crippled C and constrained super-verbose LISP
>years and years later you rely on huge libraries and toolsets to work around the massive failures of the languages and end up with a longer training period for newbies and more entrenched toolset knowledge as a pre-req
>>
>>56823127
>anti-OOP people just don't understand OOP
Retard

>just read GoF
We've had this conversation before
GoF is snake oil for the snake oil
GoF only exists BECAUSE of industry OOP, these problems don't exist in proper languages
>>
>>56823127
>anti-OOP people just don't understand OOP
this
>>
>>56822999
>Stack, Vector, Hashtable
Those are 3 different classes with 3 different use cases
I don't know why hashtable is even here, since it's completely different thing than other two
Stack extend the Vector class and has different synchronization strategy.
Mostly you use Vector, Stack is for something else (I honestly don't even know the use cases, I never needed that class)
>Enumeration and Iterator.
Never heard of Enumeration before, never seen anyone use it anywhere, including standard library.
>Date and Claendar
Both of them are old API and LocalTime, LocalDate, MonthDate are the new one.
I agree that they are bad, but I think it was pretty much standard to use external library for dates like Joda Time. That was before Java 8 of course, which brought very clean date api.
>Yes, but that still isn't a valid excuse for keeping them in after all these years. JDK team really should start doing some spring cleaning in their APIs.
Have you ever heard of backward compatibillity?
Well, that's why all the above classes are still around, but I don't see how a couple of deprecated classess which nobody (except legacy systems) uses is a bloat.
>>
>>56823136
Then you need to look at OS interactive programing. Or system close programming, or whatever the fuck the accepted term is in english.

Or learn Qt, GTK, SDL, FLTK or GLFW+OpenGL.
>>
>>56823101
OOP is increasingly deprecating in game development with leads for large studios like Mike Acton confirming that there's almost no technological advantage to using C++ over C beyond the availability of programmers.
Huge swathes of C++ is outright banned at studios like Ubisoft for similar reasons.
>>
>>56823204
Out of these, which one is available for Java as well?
>>
>>56823210
C++ isn't "C plus OOP". Nothing wrong with templates, lambdas, operator "overloading", etc.
>>
File: asscreed.jpg (315KB, 1920x1080px) Image search: [Google]
asscreed.jpg
315KB, 1920x1080px
>>56823210
as if ubisoft stands for code quality lmfao
>>
>>56823127
Kek, Muratori was a self-avowed Meyer-reading OOPfag for a long time hence the hate. It's not an opposition born out of merely the theory.
>>
>>56823124

The thing is that anti-OOP arguments are predicated on the purveyor's opinions being axiomatic in some way. For instance a common argument is that inheritance is ill-equipped to model real world hierarchies. Well, says who? Some contrived example isn't good enough. Another frequent argument is that the whole noun-verb model of objects and methods is incapable of modelling interaction BETWEEN objects in the real world. Once again, says who?

It's literally contrived examples all the way down.

I'm not saying that OOP is the greatest thing to ever happen to program. I'm not even saying it's all that great. I think multiparadigm is the way forward, because it blends imperative, OOP, functional, etc. styles when they make SENSE to be used. With that said, he whole "OOP IS GOOD FER NUTHIN!" meme seriously needs to die, because it's stupid and the people who believe in it are universally buttlickers.
>>
>>56823210
What the fuck does C++ vs C have to do with the merits, or lack thereof, of OOP, you langcuck? You can do OOP in C.
>>
>>56823245
Provide some examples of where OOP is the right fit.
>>
>>56823046
>You cannot even make a GUI without libraries, so I guess truly "knowing" C++ includes knowing Qt
truly knowing C++ doesn't technically require knowing any libraries (it definitely doesn't require knowing Qt - there are much leaner/simpler GUI libraries, by the way). not knowing libraries just might limit what you can easily do

>C++ without libraries is not that much, actually
it... kind of is. you might want to try "going deep", as you say. you might find it's a deeper rabbit hole than it looks. make sure you're reading modern material, C++11/14 really changed the game. everything you don't know is either something you're missing out on, or something that's gonna bite you in the ass
>>
>>56823202
Stack is old version of Deque, Vector is old version of ArrayList and Hashtable is old version of HashMap. They were really badly written and you had to use custom code to access them if you wanted decent performance. When adding the new collections Java devs put them as seperate classes and left the old ones intact because of that custom coding which doesnt work with the better designed classes.

>Never heard of Enumeration before, never seen anyone use it anywhere, including standard library.
It was the old version of Iterator with worse method naming and no support for optional add/remove functions.
>>
>>56823245
>because it's stupid and the people who believe in it are universally buttlickers

not an argument.
that said, OOP IS GOOD FER NUTHIN!
>>
>>56823252
>You can do OOP in C.
This simple fact really triggers some people.
>>
goddamn I'm pretty sick of the anti-OOP circlejerk that has been particularly bad the past year or so.

why is it that 99% of enterprise code is object oriented? why...why is that?
>>
>>56823245
If you want to see the problems with OOP, read GoF
>>
>>56823216
None of them.

Java has Swing.
>>
>>56823216
I don't know about the others, but OpenGL is availible in java in form of LWJGL, but it's for 3D graphic, not for GUI.
>>
>>56823222
>C++ isn't "C plus OOP".
Quite right. C actually allows you to write a proper dispatch system that isn't a static table you can't touch for little to no reason for example.
And it doesn't have a bajillion side-effects as a consequence of an utterly retarded design committee.
>>
>>56823259
OOP tutorials
OOP classes
OOP training courses
OOP books
>>
>>56823289
Not examples.
>>
>>56823275
It's easier for stupid people
>>
File: [tilting increases].png (27KB, 500x500px) Image search: [Google]
[tilting increases].png
27KB, 500x500px
>>56823275
b-but
muh haskell
muh lambdas
muh higher kinded types
>>
>>56823245
>Well, says who?
The diamond problem.
>>
>>56823260
>make sure you're reading modern material

Mkay.
Mind giving me a book or tutorial link? And an example of what I might be missing out?
>>
>>56823277

I didn't say OOP was infinitely powerful or expressive. I know that design patterns are a result of limitations.

>>56823268

w e w

>>56823259

I can't think of any, and if I did, they would be just as contrived as the arguments AGAINST oop. The simple fact is that real software is more nuanced.
>>
>>56823252
What people mean by OOP varies by language desu.
C++'s "OOP" is quite easily the most cancerous one though.
>>
>>56823259
polymorphism.

you have 100 types of enemies in a game, they all use similar moves.
>>
New thread: >>56823332
>>
>>56823281
JavaFX is the current API.

>>56823275
OOP is really good for pajeet-tier programming. You have a simple interface that has simple methods. You dont need to think or invent anything new, just connect the dots by moving and returning variables. When you hear about AI replacing programmers it's this kind of work that is being replaced.
>>
>>56823275
>why is it that 99% of enterprise code is object oriented?
Probably because you're working with GUI's and other shit whose libraries force you to resort to a OOP style and whose models aren't utterly brainbreakingly terrible.
The second you have to do something that requires real performance any idiomatic OOP flies out the window fast.
>>
>>56823310
OOP isn't just not infinitely powerful or expressive, it's EXTREMELY LIMITED in its power and expression.
OOP, especially in C derivatives, is extremely brittle and poorly composable.
>>
>>56823337
That's just code reuse, not specifically polymorphism. Do you really think OOP is the only thing that nets you either of those things?
>>
>>56823310
Thanks mummy!
>>
>>56823374

That's not an argument.
>>
>>56823260
>truly knowing C++ doesn't technically require knowing any libraries
I disagree. I would claim you need to be familiar with stl to be able to claim knowledge of C++.
>>
>>56823345
>The second you have to do something that requires real performance any idiomatic OOP flies out the window fast.
not really, you pack related data into structs ("objects") and you have related functions/methods which operate on the data
>>
>>56823337
All of which will be different and should probably reuse code in lieu of setting up retarded hierarchies.
If polymorphism in game development is used it's generally as a huge entity blob which all entities are composited of.
>>
>>56823282
If you can do 3D, you can do D2, and if you can do 2D you can do GUIs.
>>
>>56823429
using opengl for GUI is retarded, only ok for games and games typically have very rudimentary start menus
>>
>>56823261
I don't know what century were last you coding with java but thing like ArrayList are here since java 1.2.
The devs had to leave the old classes because of backward compatibility, but I don't see how that's a bad thing since everyone uses the new classes anyways, which are clean and well documented.
The only case that would be bad is if people were using both, like in case of swing vs JavaFX which was your only valid argument.
>>
>>56823314
What people mean by OOP varies by individual. It seems no one can actually agree on what OOP is, when pressed on the matter.
>>
>>56823429
You also can code a webapp in assembly but you don't do it, because it's fucking stupid.
>>
>>56823487
coding a webapp in assembly is several orders of magnitude more stupid than coding a gui in opengl.
>>
>>56823245
inheritance isn't particularly useful because it allows overriding.
overriding results in a sub type relying on the concrete implementation of the method it's overriding, not just the api and the abstraction
the fragile base class problem, basically.
encapsulation is a useful thing, no doubt.
having a special syntax for stateful functions (methods) isn't that bad either.
what's bad is attempting to throw problems that can be solved without state escaping the function into an object.
you end up with the same syntax for both stateful and stateless computations and the advantage of having two seperate syntaxes is ruined.
if you use OOP within these boundaries (encapsulation to expose a consistent API and to hide both state and implementation, classes + methods instead of functions only when the class needs to encapsulate state, composition instead of inheritace) then oop is completly fine.
i'd also be fine with using a class with no state to use interfaces as a collection of function types, if the language has no construct for that.
the real issue at hand is the way oop is taught at school: a silver bullet to software architecture by supposedly making all code more readable by using objects to turn normal code into code that follows the "subject verb object" structure.
using patterns blindly is also an issue, because it often complicates the necessary abstraction a lot more just to add redundant extension points that'll never be utilized and to make the code look more like english.
the same goes for using inheritance: it's taught that inheritance is a silver bullet to model hierarchies, instead of teaching it as just another type of abstraction with pretty strong limitations.
ruby is an especially contrived example where the idea of code having to look like english went rampant.
>>
>>56823308
bjarne's books are good
read up on anything in these you don't know
https://isocpp.org/faq/
http://www.gotw.ca/gotw/
https://herbsutter.com/gotw/

>>56823399
you should definitely know the STL, i figured that was a given
>>
>>56823594
then agian, this opinion might be slightly tinted by the the fact that i know a bit of OpenGl, but not assembly.
>>
Do you ever decide to ask a question, but by the time you're done typing up the post you've realized all the replies, sou you just don hit post?
>>
>>56823888
No.
>>
File: 1473973300548.gif (154KB, 400x400px) Image search: [Google]
1473973300548.gif
154KB, 400x400px
>>56819300
>LOL so hard... break rib.
>Decide to rest from 4chan for my health...

U b 4kin killin meh, bwa...
>>
File: 230895792358.gif (629KB, 450x253px) Image search: [Google]
230895792358.gif
629KB, 450x253px
56823905 (You)
>>
Am I ever going to follow a tutorial and have the tutorial code actually compile correctly?
>>
>>56824133
>>56823332
>>
>>56820909
>>Rust or Nim-lang?
>Neither.

Why?
>>
Trying to figure out how to remove duplicate service types from this query but keep the latest one. SQL 2008

$tsql = "SELECT * FROM contracts WHERE client='{$_POST['client']}' ORDER BY serviceType";

<td>
<?php echo $row['serviceType']?></td>

<td>
<?php echo $row['updated']?></td>
>>
>>56824914
>>>/g/wdg
>>
>>56824914
'; TRUNCATE TABLE contracts; --
>>
File: 1462887177447.jpg (80KB, 934x934px) Image search: [Google]
1462887177447.jpg
80KB, 934x934px
>>56824941
>>56824945
>>
This is awful but it worked :^)

$tsql = "SELECT DISTINCT updated, clientRef, client, serviceType, product, provider, qty, rate FROM contracts WHERE client='{$_POST['client']}' ORDER BY serviceType";
Thread posts: 353
Thread images: 39


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.