• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

DevGAF: The Official Programming Thread

Do you program? If so, in which languages?


  • Total voters
    103

Kazza

Member
(y) Hey, I've been using vim for over 20 years by now :messenger_beaming: It's hard to grasp at first but once your head clicks you can edit text very fast. I got the vim plugin for Visual Studio Code so that I can type as if it were the console.

I've been enjoying using it so far, but can understand how some people are put off right from the start. I mean, it won't even let you write anything until you hit the "i" key. I can see some people giving up right there. I saw this funny Vim joke last week that hits on the same issue:

 

Kazza

Member
Ok, first Sunday progress update. I've pretty much done the C tutorial. Here is a list of the topics covered. Is there anything important missing?

c3mNTy4.png

PFBeGQ8.png

BKLNReI.png


The tutorial used Vim, which I actually quite enjoyed. I've been going through Stranger Things recently (one episode a day) and the basic, green text, command line style fits the 80s mood very well :messenger_beaming: . I've used other, more modern IDEs when writing Python, but I really like the minimalist aesthetic of Vim. Any Vim users here?

KYXnrUz.png


The Harvard CS course has been really worthwhile watching. The first few were a little basic, but is was a nice little ego boost being smarter than all those Harvard students (in this small area, at least). Things got more interesting a few videos in, and I particularly liked the algorithm part. I will finish the series early next week, but would ike to cxontinue spending 1 hour a day watching these kind of theoretical computer science lectures. Does anyone have any recommendations?

I haven't done the Data Structures course yet, so that's top priority for next week. I hope to dive into a little assembly language coding too. I have found this channel which explains how to code for the NES/Megadrive/Master System etc. Even if by the end of the week all I've achieved it writing "Hello World", I still want to experiment a bit with this kind of low level coding before moving on.



I finished off the C programming course and Harvard CS course this week, but got overly distracted by other things, so didn't make a start on the assembly studies. I listened to a podcast (Lex Fridman, I think) with a neurologist who said that the first couple of hours after waking are among the best for creativity and ideas and that it's not a great idea to fill your head with too many external things during that time. I usually spend the morning checking the news, GAF etc, but next week I want to spend the first 4 hours of each day on the most important thing for that day, which for me will be my programming studies.
 
I've been learning c, c++, c sharp, javascript, java, python , HTML, SQL and css.

I like the c based languages, python and javascript.

But I despise Java. I think it's a poorly constructed language, unnecessarily complicated, and opaque almost on purpose. In my opinion it's a failure as a programing language.
 
H

hariseldon

Unconfirmed Member
I've been learning c, c++, c sharp, javascript, java, python , HTML, SQL and css.

I like the c based languages, python and javascript.

But I despise Java. I think it's a poorly constructed language, unnecessarily complicated, and opaque almost on purpose. In my opinion it's a failure as a programing language.
Java is beautifully engineered and does a tremendous amount to ensure quality code. It has its boilerplate but mostly that can be solved with Spring Boot and Lombok.
 
Last edited by a moderator:
Java is beautifully engineered and does a tremendous amount to ensure quality code. It has its boilerplate but mostly that can be solved with Spring Boot and Lombok.

If were to use the term "beautifully engineered", my exposure so far would associate it to a language such C. It is direct, transparent and easily allows the logic in a person's mind to be translated into code. It's a direct language.


As for java look at this.

"Class" "Object" = "new" "class instance"

Jesus Christ... this is unnecessarily complicating things.

Other "classed, object, attribute" based languages are easier to understand.

If I find who created Java I'll beat him/her with club. (wouldn't be surprised if it happened to be a woman, they tend to complicate things).
 
Last edited:

ReyBrujo

Member
"Class" "Object" = "new" "class instance"
Java is an enterprise language, I'd bet every bank in the world uses it as a backend (except the newest fintechs). So the "consortium" is very careful when introducing changes. Also, there's this Oracle issue where they :messenger_beaming:

In 2004 with C# 3 you got lambdas (C# itself was born in 1999) to use with linq, however Java had to wait until 2014 to get streams and lambdas. That's a 10 year difference (not even counting that Python had it a few years before, C++ had it in the 90s, Smalltalk had it in the 70s, Scheme had it in the 60s, or was it in the late 50s?).

Now, with C# 3 and in order to support lambdas C# added variable inference, being able to create variables without having to tell them the type. This can be used outside linq as well, so you can have var value = 3; and the compiler will infer (at compilation time) that value is an integer. Same way you can say var value = new Person(); and it will infer value is of type Person. With C# 9 you can also let the compiler infer by context, so you can declare a class and if you do Person value = new(); which will create a Person object, but which simplifies more complex scenarios like someMethod(new() { IgnoreWhitespace =true }); which will create the object that someMethod requires as argument, and set the IgnoreWhitespace property to true. And remember that C# is a strongly-typed, statically linked language just as Java (of course Javascript syntax is much simpler because it's a weakly-typed dynamically linked one).

For 2021 they are thinking about adding value types (you know, structs from C?) and pattern matching for switch expressions, features already existing in Kotlin and C#. For other features they are pretty on pair with C# (records, switch expressions, etc). I think Java got stagnated until C# started getting some steam, and they probably dismissed it as a simple clone until linq arrived. When you see statistics Java is always at the top 3 most used languages but it's not saying too much, as again it's just that way too many companies are supporting legacy applications in Java and are not willing to migrate... it's similar to PHP, it powers 70-80% of the web but just because 95% of the people using PHP use it through Drupal or Wordpress.

When I write code in Java I cringe, there's so much redundancy, so many words that aren't necessary... I did Android for a year in 2018 and when I saw comparisons with Kotlin I wanted to shoot my foot :messenger_tears_of_joy:
 
Java is an enterprise language, I'd bet every bank in the world uses it as a backend (except the newest fintechs). So the "consortium" is very careful when introducing changes. Also, there's this Oracle issue where they :messenger_beaming:

In 2004 with C# 3 you got lambdas (C# itself was born in 1999) to use with linq, however Java had to wait until 2014 to get streams and lambdas. That's a 10 year difference (not even counting that Python had it a few years before, C++ had it in the 90s, Smalltalk had it in the 70s, Scheme had it in the 60s, or was it in the late 50s?).

Now, with C# 3 and in order to support lambdas C# added variable inference, being able to create variables without having to tell them the type. This can be used outside linq as well, so you can have var value = 3; and the compiler will infer (at compilation time) that value is an integer. Same way you can say var value = new Person(); and it will infer value is of type Person. With C# 9 you can also let the compiler infer by context, so you can declare a class and if you do Person value = new(); which will create a Person object, but which simplifies more complex scenarios like someMethod(new() { IgnoreWhitespace =true }); which will create the object that someMethod requires as argument, and set the IgnoreWhitespace property to true. And remember that C# is a strongly-typed, statically linked language just as Java (of course Javascript syntax is much simpler because it's a weakly-typed dynamically linked one).

For 2021 they are thinking about adding value types (you know, structs from C?) and pattern matching for switch expressions, features already existing in Kotlin and C#. For other features they are pretty on pair with C# (records, switch expressions, etc). I think Java got stagnated until C# started getting some steam, and they probably dismissed it as a simple clone until linq arrived. When you see statistics Java is always at the top 3 most used languages but it's not saying too much, as again it's just that way too many companies are supporting legacy applications in Java and are not willing to migrate... it's similar to PHP, it powers 70-80% of the web but just because 95% of the people using PHP use it through Drupal or Wordpress.

When I write code in Java I cringe, there's so much redundancy, so many words that aren't necessary... I did Android for a year in 2018 and when I saw comparisons with Kotlin I wanted to shoot my foot :messenger_tears_of_joy:

The thing is, with c, the way the code is structured give emphasis on a more mathematical way of thinking.

Java is more dependent on verbose and on freely inserted terms for classes, objects, attributes and then you have invoke them through a data structure that VERYYY VERBOSE and LONGGGG and repetitive in its logic.

Java is genuinely confusing for me and I can't get my head wrapped around it.
 

psorcerer

Banned
When I write code in Java I cringe, there's so much redundancy, so many words that aren't necessary... I did Android for a year in 2018 and when I saw comparisons with Kotlin I wanted to shoot my foot :messenger_tears_of_joy:

There are IDEs with almost perfect static analysis for Java. AFAIK there are none of these for C#. And even less for C++/C.
Writing Java without an IDE is horrible though.
 
Last edited:

ReyBrujo

Member
The thing is, with c, the way the code is structured give emphasis on a more mathematical way of thinking.
C is a procedural imperative language, Java is an object-oriented (albeit not pure) paradigm. I'm used at object-oriented, having used it for 20 years so even when I write C code I format it as if it were object-oriented (in fact it's similar to how you would write in Go, one file per "class", static variables as members, export methods as public, etc). It's only natural that if you are used at C when you see Java, C# or (much worse) Smalltalk code you'd not understand it the way it's supposed to.

By the way, you should check functional programming in Haskell or F#, if you are into mathematical ways you'll totally love them.

There are IDEs with almost perfect static analysis for Java. AFAIK there are none of these for C#. And even less for C++/C.
That's true, but that doesn't mean that you end up with 2x the code you'd have in other languages. And since a programmer spends around 90% of the time reading code instead of writing ("Clean Code" by Uncle Bob) it's not that helpful.
 

psorcerer

Banned
And since a programmer spends around 90% of the time reading code instead of writing ("Clean Code" by Uncle Bob) it's not that helpful.

Reading Java code is a breeze. You just jump around with "go to definition", "go to usage" and everything is clear.
Like really, reading Java is the easiest thing.
Compare it to reading a little of C++ :messenger_tears_of_joy:
 

supernova8

Banned
So I was jumping around between VBA, Python and R and I've ended up on Python.

Doing the course from "Programming with Mosh" on Youtube.

I was originally following along with the "Python for Everybody" video series but I find that guy spends way too long explaining things and not enough time getting me/us to do things. Think I've learnt AND put into practice more in 45 minutes with Mosh than I did in 2 hours with the other chap.

I'm still at the stage of writing stuff like:

name = input("Hi there! What's your name? ") #We can assign the variable via user input
print("Nice to meet you, " + name) #Concatenating Hi with user's input
fav_colour = input("By the way, what's your favourite colour? ")
print("I see, so your name is " + name + " and your favourite colour is " + fav_colour + "!")

but you know what? That's an achievement for me as a complete novice and it's great to go a bit beyond just printing stuff randomly.

Hopefully I'll get onto if/elif/else stuff soon and be able to do stuff like print little sarcastic jabs depending on what the input is, or be able to make it so that the program can interpret "green" and "Green" as the same thing.

I guess my first "real" program is going to be a mini text adventure game with a couple of forks in the road.
 
H

hariseldon

Unconfirmed Member
If were to use the term "beautifully engineered", my exposure so far would associate it to a language such C. It is direct, transparent and easily allows the logic in a person's mind to be translated into code. It's a direct language.


As for java look at this.

"Class" "Object" = "new" "class instance"

Jesus Christ... this is unnecessarily complicating things.

Other "classed, object, attribute" based languages are easier to understand.

If I find who created Java I'll beat him/her with club. (wouldn't be surprised if it happened to be a woman, they tend to complicate things).

Chicken fred = new Chicken();

Ok so you can't save anything on the left side because you need to be clear about instantiating a new variable, otherwise you run into the problem of misspelling and creating a new variable by accident. So that leaves us with the right side. Conceivably you could shorten to new() and infer the type from the left-side class. That's it. Can't shorten it any more. We've shortened generics with HashMap<Long, String> myMap = new HashMap<>() so that's not too bad these days. Then there's things like Lombok so instead of making all the getters and setters you need for proper encapsulation (you are encapsulating your classes aren't you?) you just add an annotation to the class ( D data for both, or just @Getter or @Setter for one or the other) and it's done.

As others have mentioned IDEs do a tremendous amount of the donkey-work for you, and I would agree that writing without one isn't fun, and I would also add that the ceremony in getting a bigger program fired up can be a pain in the balls, but maven has made that kind of thing much easier in terms of dependency management etc, and Spring Boot makes it a piece of piss to build all kinds of applications.

I moved from PHP to Java, and the difference was night and day, such a jump in quality and the amount of awesome work Java does to prevent shit code is fantastic. It means the IDE can always point you to any fuckups. I spend a lot of time in Typescript too these days and that's another fun language, a vast improvement on Javascript which simply lets you get away with too much, and I reckon C# is pretty tasty too.

As others have mentioned it's possible the Object-oriented nature of java is what's causing you to dislike it. Certainly I remember over 20 years ago at college doing my A-levels I absolutely detested it coming from the likes of Visual Basic, I just couldn't wrap my head around OO for some reason, I certainly never thought I'd end up doing Java for a living, my old tutor would probably laugh his tits off.

Others have mentioned Kotlin and certainly that looks pretty cool - it's worth noting that Java is conservative, and for good reason. It builds BIG applications that need to be robust, no fucking about. You can mix and match with Kotlin in the same application if you want, but Java is there to provide a gold standard, with guaranteed support etc, which when you're writing applications that ensure people are getting paid on time (millions of pounds being processed) is very important. It may not be cool and sexy but that's fine by me. It works, it's battle-tested, it's reliable and it pays really fucking well, so while the hipsters are enjoying their latest new magical framework on Node or doing some shit in Python, I'm getting the mortgage cleared fast and getting important things done.

EDIT: Forgot to add - java is very very readable. It's super-clear what does what, I really don't see what the problem is. Making things shorter doesn't make them easier to read.
 
Last edited by a moderator:
H

hariseldon

Unconfirmed Member
You probably just never used C++ in big projects. And when a race for performance is needed. It looks so ugly my eyes bleed.

There's a key point. C++ is great when you really need super-fast performance, but it's gonna get ugly, though to be fair all highly speed-optimized code tends to get ugly. In some ways one of the biggest benefits of modern cloud architecture is that there are fewer use-cases requiring absolute raw speed as you can shard your application over multiple servers and add more power these days, run your application in a swarm of docker containers, etc, which means that for the most part what matters is not execution time but programmer time/capacity, which is greatly impacted by how easy the code is to read and maintain. To that end, Java works well.
 

ReyBrujo

Member
Reading Java code is a breeze. You just jump around with "go to definition", "go to usage" and everything is clear.
Lol, true, but good code should be understandable without having to jump from file to file.

EDIT: Forgot to add - java is very very readable. It's super-clear what does what, I really don't see what the problem is. Making things shorter doesn't make them easier to read.
True. But variable inference helps, it's rather easy to implement, and makes you focus on the right part of the assignment instead of the left side.

I like c++, I find it more understandable than Java.
I miss my arrows from C++ :messenger_beaming: Since I started with C I quickly grew used at C++ syntax but I have to admit that it becomes somewhat messy when dealing with templates of templates of templates. Also the preprocessor magic disappeared from all newer languages and with a good reason, they are awful K&R C hacks that survived 40 years. When I see unit testing in C++ with macros I find it so unappealing... and I love unit testing in any language... :messenger_mr_smith_who_are_you_going_to_call:

Doing the course from "Programming with Mosh" on Youtube.
Oh, I did a course with Mosh at Udemy (Unit Testing for C# Developers) and I thought it had good value for beginners, he explains well and there's good production value. Unfortunately he milks courses after 6 or so months so unless you catch his courses soon after released he won't answer any question or update the topic, which kind of kills the Udemy concept. But he explains well, true.

Then there's things like Lombok so instead of making all the getters and setters you need for proper encapsulation (you are encapsulating your classes aren't you?) you just add an annotation to the class ( D data for both, or just @Getter or @Setter for one or the other) and it's done.
If you were encapsulating your data you wouldn't need getters as all the processing would be done internally through a public protocol (interface for those coming from C++-based languages), implementing a command and query pattern, and whenever you need it to display or serialization you'd implement a double dispatch pattern or a visitor pattern where the object serializes itself instead of having someone else access your internal data through getters.

It works, it's battle-tested, it's reliable and it pays really fucking well, so while the hipsters are enjoying their latest new magical framework on Node or doing some shit in Python, I'm getting the mortgage cleared fast and getting important things done.
There, there, no need to insult other languages. What you say is totally true, and as I posted above the reason why Java is still listed in the top programming languages just as PHP is listed as having 80% of web presence. It's also true that Java pays well, that Go and Kotlin pay even better, and that Python will pay even more if you orient yourself to data science. Have you heard anything about data science, business intelligence, machine learning or deep learning in Java? That's where industry is going and where Python will excel (unless R can become as versatile as Python).
 
H

hariseldon

Unconfirmed Member
Quite frankly if you're going to be patronising then I have no desire to engage any further with you.
 

ReyBrujo

Member
Quite frankly if you're going to be patronising then I have no desire to engage any further with you.
Sorry if you took it that way, it was not my intention. We are programmers and our egos are big by nature (quoting Uncle Bob in "Clean Coder"). And as you say, as long as it pays the bills or makes us happy, the language doesn't matter.

(Although you sounded patronizing as well implying that Java is the only way to get "important things done" while others are just fooling around).

By the way, for Java learners there's an O'Reilly Java Bundle ending in 3 days. I checked and I already own 5 of those books so not buying it (plus my queue is already long enough). Of course they place the book that can teach you Java from scratch in the highest tier but well, it's marketing ¯\_(ツ)_/¯

You can also get D3.js in Action for free if you sign up to Manning's newsletter until Nov 28.

C# C++ SQL and JAVA and now learning some functional programming HASKELL
I tried Haskell, didn't reach too far because I wasn't motivated. Now that everything is going functional I might give F# a chance since I can add modules to my existing C# code base.
 
Last edited:

psorcerer

Banned
Typescript

No. Just no.
That MSFT volmit of a "let's dump a C++ complexity on top of an already shitty language" is just a no go.
Using a good framework for data transformations (Redux, Immer, Mobx) is pretty much enough to make javascript bearable. No need for that shitty class-based pseudo-OOP.
 
H

hariseldon

Unconfirmed Member
Raw speed is needed for good hw utilization, i.e. tensorflow, gamedev.
And there you cannot use Java at all.



That's impossible. :messenger_tears_of_joy:
No. Just no.
That MSFT volmit of a "let's dump a C++ complexity on top of an already shitty language" is just a no go.
Using a good framework for data transformations (Redux, Immer, Mobx) is pretty much enough to make javascript bearable. No need for that shitty class-based pseudo-OOP.

You're doing a remarkable job of showing how little you know. First up, not used java for tensorflow so I can't comment on that (a quick google turns up https://www.tensorflow.org/install/...API for using TensorFlow in a JVM environment. but no idea how useful that it) but I can tell you now it does plenty of game dev - for starters every fucking android game. Second, frameworks like LibGDX power quite a few indies on desktop etc. Oh and Minecraft.

Your thoughts on Typescript read like a 12 year old, I'm amazed you didn't type micro$oft or some other shite. Strongly-typed languages fuck up less. Simple. It sounds to me like you're too much of a simpleton to cope with types. That's on you, not the language.
 
Last edited by a moderator:

psorcerer

Banned
for starters every fucking android game

Not all games need performance, and there was NDK IIRC.

Second, frameworks like LibGDX power quite a few indies on desktop etc. Oh and Minecraft.

High level code can run on any runtime, no perf is needed.
C#, Lua, etc. are used a lot.

Strongly-typed languages fuck up less.

It doesn't excuse how TS is implemented.
If any change leads to type refactoring efforts - it's a bad idea.
What prevented them from using better designs like aspects or components?
 

wolfmat

Confirmed Asshole
Raw speed is needed for good hw utilization, i.e. tensorflow, gamedev.
And there you cannot use Java at all.
Just use native interfaces. Or libraries that use native interfaces with a nice API. So if you need to like loop through some triangle soup or whatever, you can go that route. And that's why gamedev is totally an option in Java. Or bulk math. I used to write games for fun / learning with LWJGL a decade ago, for example.
I get that it seems like a cop-out, but it's not.

Same can be said about Python.

---

With any language, it's really you getting a solid foundation in the language logistics, understanding how to read documentation, and accumulating experience.

Professionally, I write backend Java code, among other things; it's not that hard. You've got to read the docs of the libraries though, otherwise you're fucked. Bringing something like Spring Boot + Lombok + MongoDB + GraphQL together requires a thorough attitude. You won't Ctrl-Space yourself out of that one!

Especially in the planning phase, if you've never spiked the libraries you're about to consider, then you're likely in for a lot of pain with them.

It's the same with C++, I find. You need to be solid on documentation. And you need experience.
 

wolfmat

Confirmed Asshole
I don't see the point.
Better use a scripting language, or language with a better embedding: lua, js.
It's a matter of context. Sometimes a Java ecosystem around a native-interfaces lib is just right. Could be a multitude of reasons. Existing codebase, ecosystem, familiarity. That context could also point towards something like Lua or JS, of course. If those are not factors, meaning if everything else is equal, then it's a diceroll, sure.
 

psorcerer

Banned
It's a matter of context. Sometimes a Java ecosystem around a native-interfaces lib is just right. Could be a multitude of reasons. Existing codebase, ecosystem, familiarity. That context could also point towards something like Lua or JS, of course. If those are not factors, meaning if everything else is equal, then it's a diceroll, sure.

Dunno. Never found the Java native stuff good enough. And I do have nightmares from Hadoop data manipulation crap that I needed to write. :messenger_tears_of_joy:
I do think that Java is a pretty solid language, but it's integration with native code was always pretty sketchy...
 

wolfmat

Confirmed Asshole
Dunno. Never found the Java native stuff good enough. And I do have nightmares from Hadoop data manipulation crap that I needed to write. :messenger_tears_of_joy:
I do think that Java is a pretty solid language, but it's integration with native code was always pretty sketchy...
With Hadoop, I've got more concerns about devops junk like setup and migration than about the interfacing code. I find the code relatively easy to maintain.

I don't think JNI is sketchy. It's surely not trivial, I'll give you that.
 

Kazza

Member
I finished off the C programming course and Harvard CS course this week, but got overly distracted by other things, so didn't make a start on the assembly studies. I listened to a podcast (Lex Fridman, I think) with a neurologist who said that the first couple of hours after waking are among the best for creativity and ideas and that it's not a great idea to fill your head with too many external things during that time. I usually spend the morning checking the news, GAF etc, but next week I want to spend the first 4 hours of each day on the most important thing for that day, which for me will be my programming studies.


I almost forgot, I also found this great youtube channel called Ben Eater. He goes through some really basic, low level stuff, but in a very practical way (by building his own 8 bit computer etc), and I've really enjoyed the matching the theory with the actual workings of the computer:

 
Last edited:

psorcerer

Banned
It sounds to me like you're too much of a simpleton to cope with types.

Today's results: index.d.ts of 38MB, compiles 18 minutes.
That's from one project with a heavy mixin usage that's <50KB of source code.
Sorry. Typescript is not suitable for anything that's not a child play.
 
Last edited:
H

hariseldon

Unconfirmed Member
Today's results: index.d.ts of 38MB, compiles 18 minutes.
That's from one project with a heavy mixin usage that's <50KB of source code.
Sorry. Typescript is not suitable for anything that's not a child play.
Do you do console warring in your spare time or is it just programming languages?
 

phisheep

NeoGAF's Chief Barrister
Just joining in.

Originally, way back, COBOL and PL/I programmer. Back into it after a long long break and having fun with Python, C and Forth.
 
H

hariseldon

Unconfirmed Member
Nope, I'm just developing a javascript-based platform and typescript-people are truly obnoxious... 😂
I’m a whatever gets the job done person. Typescript is a good effort at unfucking JavaScript and allows me to get shot done. It’s one of a number of tools I use to get a job done - current project is Angular front end with Spring micro services backend on Docker containers. I’m not religious about these things - my only red line is no Drupal (god awful shite). Tools are chosen for efficiency, reliability and battle hardness, ease of recruiting staff, ease of maintenance, etc.
 

psorcerer

Banned
I’m a whatever gets the job done person. Typescript is a good effort at unfucking JavaScript and allows me to get shot done. It’s one of a number of tools I use to get a job done - current project is Angular front end with Spring micro services backend on Docker containers. I’m not religious about these things - my only red line is no Drupal (god awful shite). Tools are chosen for efficiency, reliability and battle hardness, ease of recruiting staff, ease of maintenance, etc.

I have nothing against people who use whatever they want, I've read so much code in my life that nothing really scares me (apart from some high-perf C++) I can parse regexps in my head and read Perl just fine.
On the Angular+Spring front I would think more about how data is flowing in the system. And TS or no-TS is a minor detail there.
 
H

hariseldon

Unconfirmed Member
I have nothing against people who use whatever they want, I've read so much code in my life that nothing really scares me (apart from some high-perf C++) I can parse regexps in my head and read Perl just fine.
On the Angular+Spring front I would think more about how data is flowing in the system. And TS or no-TS is a minor detail there.
Spring is just rest services for the Angular app (and eventually the mobile apps) - the god thing with Spring is that it cuts down donkey work to get things done so you can concentrate on that data flow to whatever DB fits the use case.
 

psorcerer

Banned
Spring is just rest services for the Angular app (and eventually the mobile apps) - the god thing with Spring is that it cuts down donkey work to get things done so you can concentrate on that data flow to whatever DB fits the use case.

How do you manage the app state?
 

base

Banned
Wanted to ask something about programming. If I'm a newbie but want to learn new stuff. Where to begin? Some handy stuff for beginners? Appreciated!
 
H

hariseldon

Unconfirmed Member
How do you manage the app state?
Angular manages the user end of that - a single page application that works in the same way as something like gmail means you don’t keep reloading for each action. On the back end it’s a mix of MySQL and MongoDB.
 

Kazza

Member
Wanted to ask something about programming. If I'm a newbie but want to learn new stuff. Where to begin? Some handy stuff for beginners? Appreciated!

I'm still a relative newbie myself, but in a way that puts me in a good position to give advice, given that the memory of learning is still fresh :messenger_grinning:

If I were to advise my slightly younger self on how to begin, I would first say have a go at this computer science series from Harvard:




There is actually a substantial course backing up this series of lectures, so you can take that or just watch the lectures (the course is free, btw).

If you'd rather just get stuck in to actually coding right away, then I think this is a great beginners Python course:




I tried a couple before this, but they were too "waffly" (i.e. too much talking). This guy keeps things nice and concise, while still explaining what he wants you to do and why.

Good luck
 

wolfmat

Confirmed Asshole
How do you manage the app state?
Speaking generally when it comes to frontend SPAs:
An Angular SPA frontend application (or any separate frontend application, actually) commonly has a software component that holds (encapsulates) state. One (currently popular) concept to realize this is called the store, which holds frontend state and indirectly reflects and negotiates data with the backend to leverage it for frontend state. So the frontend applications are clients of the microservice, communicate with the microservice backend and reflect synchronized data as state in the store locally, inside the frontend application. State is usually not exposed at all in this data model. Instead, partial state is fed back atomically to for example REST endpoints. Feel free to expand this model to GraphQL, or generic socket communication protocols, or whatever.

Stores are an interesting topic. They are not required, but commonly, an application without a store will have very specific shortcomings because of it. For example, if you want to have transparent data re-use in the frontend, a store achieves that with ease.

Network data exchange itself is done via the interface of the microservices (REST et al). The microservices themselves communicate and massage database content. Such backend services tend to have no state at all, or a transient state (request-scoped state), when it comes to individual clients. Microservices of course have inherent state since they're running applications, but that is of no concern to the client applications (can be seen as housekeeping state, for example thread-scoped state to deal with long-lived authorized socket connections or whatever).
 

psorcerer

Banned
Angular manages the user end of that - a single page application that works in the same way as something like gmail means you don’t keep reloading for each action. On the back end it’s a mix of MySQL and MongoDB.

Stores are an interesting topic. They are not required, but commonly, an application without a store will have very specific shortcomings because of it. For example, if you want to have transparent data re-use in the frontend, a store achieves that with ease.

Yup that's what I was hinting at: what store is used and why. My current experience tells me that the correct design of a store is pretty difficult (essentially all state management is usually difficult) and if your app needs things like: consistent undo/redo with multiuser collaboration it gets so complicated that people do a lot of stupid shit.

P.S. another good read on why TS can be bad in some cases:
We have all these problems too.
 

ReyBrujo

Member
Heads up for anyone who likes coding challenges:

Advent of code 2020 starts in around 33 hours. It's a series of challenges you can complete in any language. The challenges start off easy and get harder with each passing day.

Oh, cool, just joined and finished the first day in time. Not sure if I'll continue but it's pretty cool, thanks for sharing!
 

Relativ9

Member
Primarily C# and JavaScript, though I sit my toes into web every once in a while. It's all a means to an end for me (game design) but as I've become more and more of a director and generalist I find myself going back into helping out with the scripting (especially physics) on the various projects I work on...it's just the most immediately satisfying aspect of designing games.
 
Top Bottom