[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]

Some resources for improving as a programmar?

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: 50
Thread images: 5

File: wQe0DW4.png (4KB, 327x273px) Image search: [Google]
wQe0DW4.png
4KB, 327x273px
I know how Java and C++ work. I know you can make classes and objects to split the code up and make the code more flexible and maintainable.
I know about arrays and recursion and sorting algs and all this other applied shit that you can use to make programs

But I don't have any actual experience making actual programs. Useful ones like game and calculators and apps and all that shit. And i have no idea how to get started.

So I'm asking for some resources on mini 'projects' that will let me get my feet in the water and actually know how to use all the stuff in a way that is effective and leads to an actual program.

And this is most important for objects. I know the concept objects but I don't know how to actually apply them. Once I tried making chess, and naturally I thought I would have an Piece object and then every time of piece inheriting from it. But even though I think I had the right idea, I didn't know how to implement it and what code should go where.

I can probably make chess in one class and it would basically be a loop that works while both kings can still move, but I feel like it would be a retarded program to write that most expierienced programmers would laugh at if they ever saw it.

Pls help, thanks /sci/
>>
>>8540427
Buy a new copy of this to start.
https://www.amazon.com/Windows-Programming-Dummies-eacute-LaMothe/dp/0764516787
>>
>>8540433
>DirectX
haha
I would prefer if it was OpenGL or Vulkan but I'll check it out regardless.
>>
>>8540433
>>8540436

>windows
>>
>>8540427
>I know how Java

>>>/g/et the fuck out.
>>
Do you use chrome?
https://www.sitepoint.com/create-chrome-extension-10-minutes-flat/

More adv chrome extension
https://www.amazon.com/Learning-Program-Steven-Foote/dp/0789753391
>>
>>8540427
>And this is most important for objects. I know the concept objects but I don't know how to actually apply them. Once I tried making chess, and naturally I thought I would have an Piece object and then every time of piece inheriting from it. But even though I think I had the right idea, I didn't know how to implement it and what code should go where.

Don't try to fucking shoehorn inheritance into everything.

class Piece{
enum Color { white, black};
enum Type { pawn, knight, bishop, king, witch, rook};
tuple<int,int> location;
Color color;
Type type;
};
>>
File: Ace3.png (119KB, 261x347px) Image search: [Google]
Ace3.png
119KB, 261x347px
>>8540427
Not to be rude, but I seriously doubt you know how they work. You probably know how to use them, but there is much more that you have to learn based off what you gave in your post.

i.e. compilation, pre/post processor decisions, automated garbage collection, memory management (not just creating objects using new) being able to destruct them when need be.
>>
>>8540427
Learn C really well. This will teach you more about how the machines themselves really work, which is important for understanding performance.

Write a compiler for some language. Or at least a compiler front end that converts to an AST. You'll learn a lot from this. Doesn't have to be for a full language. Subsets like TinyJava and Tiny-C exist for this purpose.

I don't know how much you'll learn from writing a Chess program. But based on the description given, you've got quite a few things left to figure out about the implementation, so you may end up learning a lot.

If you're looking for projects, just do a bit of googling, or go to >>>/g/.

Also, programming isn't science or math.
>>
>>8540427
It really pains me to say this, because you seem really genuine and motivated op, but

>>>/g/
>>
>>8540427
anon wtf is this image
it's very disturbing
>>
>>8540427
http://www.kilobolt.com/
>>
>>8540800
I know exactly how you end up with this pattern in Java (nested callback interfaces), it is almost as famous as the zillion trailing parens at the end of a large Lisp program.

The newer Java 8 closure syntax helps a lot to reduce this boilerplate, though.

But yeah, get thee hither to >>>/g/
>>
First of all, don't worry about the look of your code, if you're just starting out, you're allowed to make mistakes.
I just reviewed some beginner's C code and I only thought "hey, he's just starting out, as I did at some point".
Second, just start. My approach has always been: start writing the headers and 'int main()' then a layout of what it's going to happen in comments:
//initialize pieces
//chess loop:
// -get player move
// -think
// -make computer move
As for the classes I usually put class definitions in header files, the associated code in it's own .cpp file, and all the code directly related to main() in it's same source file.
Then, for example, I start changing 'initialize pieces' for a function that in turn does:
initialize black player: initialize 8 pawns and all the pieces, position each.
initialize white player: ditto

And so on.

The most important thing to do is to just do it and deal with the errors as they come. Programming is a constant loop of making mistakes and figuring out where they lie and why they happened.
>>
>>8540427
Interesting topic OP.
>>
File: 8b4.jpg (33KB, 600x600px) Image search: [Google]
8b4.jpg
33KB, 600x600px
>>8540495
>witch
>>
>>8540427
Start with some GUI programming, from there on you'll be able to start making usable programs.

For java check out Swing (lots of documentation but getting old) or the newer javaFX.

It's really easy, you could start with some buttons that do shit when you click them. Then you can move on to more complicated stuff and draw out shit on a JPanel and make it respond to mouse clicks.
>>
Practice. It's just practice.

>I can probably make chess in one class and it would basically be a loop that works while both kings can still move, but I feel like it would be a retarded program to write that most expierienced programmers would laugh at if they ever saw it.
I kind of want you to write that because it's fucking me up just thinking about it and I want it see it.
>>
>>8540427
OOP is a scam, I refuse to help you for your own good!
>>
Why is OOP considered hard? Is it just brainlets?

It's literally like calling a built in function from any language that you didn't create yourself but it still exists in a file somewhere.
>>
>>8542451
1. That is not what OOP is.
2. It is not hard but as your problems change and your program evolves the OOP paradigm will force you to either do ridiculous things or rewrite large portions of code from scratch.
>>
>>8542467
that's exactly what oop is. it's a constructed paradigm.
>>
>>8542478
>>8542451
come on, bruh
what are you even doing
>>
>>8540427
all these fucking morons telling you to learn c to get good at programming lmao - 1990 called it wants it 1337 programming club back.

Just copy code from someone on youtube and then rewrite it on your own afterwards piece by piece carefully commenting what each part does (if you don't know, guess and correct it later as you figure it out).

Start out making a calculator, then a calculator that can do any arithmatic, then make a text adventure game, then make another with some images, then make a full fledged 2d game.

Make a bot for twitch (its easy as shit just look around and be prepared to extrapolate).

Another hint for you, its 2016 and there is a reason libraries are built on top of languages and scripting is becoming more popular - programming is evolving and these idiots are gonna get you left in the dust because they want you to read the encyclopedia to improve your vocabulary instead of reading a novel.

BTW one more secret, results are all that matter in programming, sure its nice to have nice, efficient code, but optimization early on is just another form of procrastination & worrying about source code is a glimmer of self-doubt.

When you go to make a chess game, don't think "is this the right way to do it?" there is no right way, just make sure a game of chess pops up when you hit play.
>>
>>8542486
>>8542467
Explain how it isn't you fucking brainlets
>>
>>8542491
what you said wasn't even a valid criticism
I don't have the energy for this right now
>>
File: 894.png (7KB, 558x565px) Image search: [Google]
894.png
7KB, 558x565px
All I know is R and how to fuck with SQL databases.
>>
>>8542491
>>8542451


Please just merk yourself.
>>
>>8542491
What you described is a library. Libraries exist for every language. You are literally retarded if you think that's what OOP is.
>>
File: 1455571524166.jpg (147KB, 600x534px) Image search: [Google]
1455571524166.jpg
147KB, 600x534px
>>8542478
>>
>>8542491
OOP is a paradigm where data is collected into discrete packages with a local namespace and locally defined functions. You don't interact directly with data, you load data into an object and then ask the object to manipulate the data.
>>
>>8542487
This is the best advice so far. I am an civil engineer that does CAD/MATLAB, and the only things that people care about are how fast you can do it and is it good enough to pass off on a client. Get it out the door and any mistakes can be fixed later on.

Most of our salesman are not engineers and they do not give a fuck about your dork crap; companies live on sales, so the sales staff are kings.
>>
>>8544606
>civil engineer
lol, you may as well have said 'certified retard' and that sentence would have read the same.
>>
>>8540541
Seconding C. Read K&R. At the very least you'll understand what's going underneath in C++ and Java and why they behave the way they do.
>>
just read ur sicp boy
>>
>>8544653
Even though it's overhyped and the first chapters are all over the place, it's actually a really good book. Makes you look at programming concepts from different angles in somewhat enlightening way.
>>
>>8544645
Nice try faggot - all my electives were numerical methods and controls - my MATLAB is far better than most others.
>>
>>8542451
you mean a library?
>>
>>8544709
>numerical methods
>Matlab
Literally programming for babby's.

Come back when you've design a programming language together with categorical semantics for the type system and a bootstrapping compiler into some type of assembly.
>>
>>8540427
http://4chan-science.wikia.com/wiki/Computer_Science_and_Engineering
http://4chan-science.wikia.com/wiki/Programming_Textbook_Recommendations
>>
>>8545134
Also. Is /g/entoomen library srill available?
>>
>>8544787
It's supposed to be for modelling, simulation and prototyping, not implementation. You can write 10-20 lines in Matlab what you could spend a week on in a compiling language.

You are like a babby craftsman mistaking one tool for a shitty version of another believing they have the same purpose.
>>
>>8544709
psst a scandinavian "civilingenjör" is called master of science in english. civil engineer is something like byggingenjör.
>>
>>8545437
No shit, but just because you have a simple prototyping language doesn't mean you don't need any others.

Woe to the fool who thinks everything can be done with Matlab.
>>
>>8545437
>prototyping, not implementation. You can write 10-20 lines in Matlab what you could spend a week on in a compiling language

It's hilarious that CS majors repeat this meme
>>
>>8545469
it's true though
depending on what compiled language, and whether or not you are allowed to use 3rd party libraries in that language for the comparison
>>
>>8545475
>coding in compiled languages is hard meme.
>>
>>8545476
never said it was hard
but it could be more time consuming to do advanced mathematics compared to matlab if you aren't allowed to use any libraries and therefore have to start from scratch
just trying to be fair senpai
>>
>>8542487

This. Don't fucking learn a language/Tool/Framework just because. Only learn it if you fucking need it to GET. SHIT. DONE.

That's what matters, and that's what your boss will care about. Don't listen to these highschool/college faggots.
>>
>>8545437
There is no such thing as a "compiling language" nor an "interpreted language". Rather given a language one can produce several implementations. It is those implementations themselves that may be compiled or interpreted or some weird mix of both. Moreover, compiling a language just means that you're translating it from one language to another language. Typically this means compiling from a higher level language to a lower level language but sometimes it is useful to go sideways (often called transpiling) or even in the opposite direction.

Python for instance has implementations that are interpreted as well as implementations that are compiled down to binary.

The standard Java implementation is compiled down to JVM (though many other implementations exist). Furthermore, JVM itself is typically then interpreted by the Java virtual machine, however if you're running on an ARM architecture then the JVM language may be implemented as microcode (sits below assembly) and you're essentially running Java JVM code at the ground floor.

For a more interesting example, Mozilla has been refining a subset of Javascript that can be compiled to assembly ahead of time and will thus run at near native speed. Alongside this they've been working on transpilers to compile other languages to Javascript. The goal then is to run serious software in the browser (eg. the Javascript port of the Unreal engine).
Thread posts: 50
Thread images: 5


[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.