Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
MrQueasy
Nov 15, 2005

Probiot-ICK

1337JiveTurkey posted:

Spring and J2EE have free versions but they're a lot to take in. If you're looking to understand the basic concepts of Dependency Injection like those two frameworks have, it's also worth looking at Guice (my personal favorite) and Dagger (extra simple) to see how it works. They all have an issue where it feels totally magical until you understand what's going on, but if there's a point where it becomes less magical it's Spring > J2EE > Guice > Dagger.

Spring is completely free. If you want to dip your toes in that I'd suggest Spring Boot

J2EE is still a thing, but I'm of the opinion that other than Jersey it's kinda stagnating.

That being said, no matter which framework you choose, (guice, spring, grizzly, jersey, express, rails, whatever), it's worth learning how to run it in a container. Full servers/vm images are kind of a dying breed in the world of cloud computing. Learning Kubernetes is not easy, but you should at least read up on what the gist of the technology is.

If you're going for Full Stack, react is a better time-sink IMO.

Muk Dumpster posted:

It would be better to learn Java over JavaScript for versatility yeah?

Enh... depends on what you're going for. My gut says it's easier to get an entry level Javascript (React) job than a Java job. Don't discount python and ruby, either. They're big data-science and startup languages still.

MrQueasy fucked around with this message at 07:05 on Mar 24, 2021

Adbot
ADBOT LOVES YOU

1337JiveTurkey
Feb 17, 2005

I'll defer to other people but I'd say JavaScript is much more widely used but has an ecosystem where you need to learn the flavor of the day which totally changes how you're supposed to look at the basics of the language. Java is widely used but not as widely as JavaScript, however within that space it's at least more consistently used. You can hop from one Java project to another with less trouble I feel. In any case look to a variety of people giving advice, I'm sorta washed up honestly.

Methanar
Sep 26, 2013

by the sex ghost
don't be a java.* developer

Methanar
Sep 26, 2013

by the sex ghost
my favorite javascript/nodejs startup story is that we used mongodb because it was webscale

javascript and mongodb both consider being typeless schemaless paradigms where developers don't need to talk to each other as features so we had this cool thing where documents in the db would have the same keys with values of different types depending on whether the info was created through the mobile app or website because the clients would save data back differently.

and javascript was okay with this because ??? so it accidentally worked in the end.

until you wanted to actually do anything useful on your data like analytics of any sort. so you'd try to move your json dumping ground into something like bigquery except you can't because your 'database' has no schema lol

Methanar fucked around with this message at 07:59 on Mar 24, 2021

MrQueasy
Nov 15, 2005

Probiot-ICK

Methanar posted:

my favorite javascript/nodejs startup story is that we used mongodb because it was webscale

javascript and mongodb both consider being typeless schemaless paradigms where developers don't need to talk to each other as features so we had this cool thing where documents in the db would have the same keys with values of different types depending on whether the info was created through the mobile app or website because the clients would save data back differently.

and javascript was okay with this because ??? so it accidentally worked in the end.

until you wanted to actually do anything useful on your data like analytics of any sort. so you'd try to move your json dumping ground into something like bigquery except you can't because your 'database' has no schema lol

While people (rightly) make fun of MongoDB (it's web scale, after all), schema-less data stores are VERY powerful, especially in read-speed-focused applications. The important piece to remember is that a lack of schema enforcement at the database/storage side doesn't necessarily mean that there is no schema at all. You just have to enforce it at a different point. Traditional relational databases are fine for transactional data with very strict schemas, but they're a bit of a cannon to swat flies for most CRUD use-cases with less than a dozen relationships. It's just too easy to Key/Value store and then dump your database to s3 in AVRO/Parquet format every night for your Data Lake to ingest.

BigQuery is not a "true" database either. It just responds to SQL as if it were. It's really neat (hypercubes!), but there's some weird gotchas like regex across large text fields being generally faster than joining.

As far as Javascript goes, the relative quality of the average Javascript dev has skyrocketed since React/Typescript stormed onto the scene. This is aided IMO by rapid advancements in the Ecmascript language spec itself. Modern javascript is no more quirky than python at this point.

MrQueasy fucked around with this message at 08:13 on Mar 24, 2021

Muk Dumpster
Jun 27, 2020


Text Here
So JavaScript is better to learn/first?

Hammerite
Mar 9, 2007

And you don't remember what I said here, either, but it was pompous and stupid.
Jade Ear Joe
NoSQL databases are for organisations so big that their operations can't be served by conventional databases. If you're looking to get in to programming, it would do you good to learn at least a bit of SQL. By "a bit" I mean you should be able to write select, update, insert and delete queries for some flavour of SQL or other (every vendor has slight differences), and you should understand the different kinds of joins that are possible.

Ideally you should also get a sense of what common database design antipatterns are. That doesn't necessarily mean being able to point at a design and say exactly which normal form it's in, but it does mean being able to spot that data is being stored redundantly or whatever.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


MrQueasy posted:

Can someone else give more junior level jobhunting advice? I don't get to see candidates until after the recruiters have done their magic.

We have a newbie thread in CoC that has a ton of job-hunting advice.

ikanreed
Sep 25, 2009

I honestly I have no idea who cannibal[SIC] is and I do not know why I should know.

syq dude, just syq!

Muk Dumpster posted:

So JavaScript is better to learn/first?

Worse for your development as a programmer, because it makes no goddamn sense half the time and makes it hard to learn good patterns, but probably a lot better for immediate career prospects.

Companies want to hire JS developers and often have lower standards for them. But it's less "respectable"

BonerKid
Jan 3, 2002

Chill

Muk Dumpster posted:

So JavaScript is better to learn/first?

Really depends what you plan on making or what type of work you want to get into. If you want to do web development you will need to know JS, if you don't want to do webdev you might still need it but other languages are going to be more useful. The important thing to realize is that the language you choose to learn matters less than the concepts that you learn in the process. A good/experienced programmer will be able to move between languages relatively easily, they just won't know all the tricks and nuances.

JS is good to learn because you can make simple scripts that are useful for web browsing (remove paywalls, automate tasks, etc) and it's currently pretty popular for both frontend and backend development for websites. The main downside of JS is it can be hard to figure out what you're doing wrong because it is loosely typed which means you might accidently be using a number where you can't use it but you won't know until you run it and get an error.

Java is alright if you want to make a standalone application, it's one of the languages people use for that but I personally don't like it and I'd suggest C# over Java. These languages are strongly typed so it usually won't even let you run the code if you have errors and the editor will show you what you are doing wrong.

Lord_Brand_X
Nov 3, 2009
Anyone familiar with lisp and/or visual lisp?

heehee
Sep 5, 2012

haha wow i cant believe how lucky we got to win :D
tried learnpython.org but i didn't really understand it.

Methanar
Sep 26, 2013

by the sex ghost

heehee posted:

tried learnpython.org but i didn't really understand it.

Give scala a try

William Henry Hairytaint
Oct 29, 2011



heehee posted:

tried learnpython.org but i didn't really understand it.

I've been trying to learn Python too and it's awful. Like I'm learning about lists and tuples and dictionaries and slicing and I'm just thinking: so loving what? How is this ever going to be practical? There's no real examples. Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

But it's just some exercise like "pull every 3rd character out of this 30 character string, not for any reason, just show us you can do it".

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

Batterypowered7
Aug 8, 2009

The mist that chills you keeps me warm.

William Henry Hairytaint posted:

I've been trying to learn Python too and it's awful. Like I'm learning about lists and tuples and dictionaries and slicing and I'm just thinking: so loving what? How is this ever going to be practical? There's no real examples. Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

But it's just some exercise like "pull every 3rd character out of this 30 character string, not for any reason, just show us you can do it".

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

NO

You'll get the small 2x2 lego pieces, one at a time, and then you'll build poo poo with that and you'll thank the people that made the tutorials for the privilege.

hbag
Feb 13, 2021

William Henry Hairytaint posted:

I've been trying to learn Python too and it's awful. Like I'm learning about lists and tuples and dictionaries and slicing and I'm just thinking: so loving what? How is this ever going to be practical? There's no real examples. Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

But it's just some exercise like "pull every 3rd character out of this 30 character string, not for any reason, just show us you can do it".

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

honestly its kind of difficult to come up with practical examples but that might just be me being unimaginative
ill try using an example from programs ive written

this brainfuck interpreter i wrote has a dictionary for storing the values on certain points on the tape:
code:
    pointerMap = {0:0}
    pointerLocation = 0
    step = 0
as you can see, it initializes by setting the value at location '0' on the tape to, well, 0. if the user moves the pointer and reads/writes the data at that point on the tape, the interpreter will reference the value with the tag '1', '2', '3', or whatever point the pointer is at (or, if it doesn't exist, create it and set it to 0):

code:
    while step < len(tokens):
        token = tokens[step]
        if token == '>':
            pointerLocation += 1
        elif token == '<':
            pointerLocation -= 1
        elif token == '+':
            if not pointerMap.get(pointerLocation):
                pointerMap[pointerLocation] = 0
            pointerMap[pointerLocation] += 1
        elif token == '-':
            if not pointerMap.get(pointerLocation):
                pointerMap[pointerLocation] = 0
            pointerMap[pointerLocation] -= 1
        elif token == '.':
            print(chr(pointerMap[pointerLocation]),end='',flush=True)
        elif token == ',':
            charInput = getch()
            pointerMap[pointerLocation] = ord(charInput)
there, that's a practical use of a dictionary

Batterypowered7
Aug 8, 2009

The mist that chills you keeps me warm.

Write a program that reads in a text file, goes through it line by line, and finds the most common and least common word, then prints the word and how many times it appears in the sentence out to the screen. Word here is defined as any sequence of letters and/or numbers, but not special characters lile space, asterisk, etc.

hbag
Feb 13, 2021

oh poo poo i should probably drop my codewars referral link
https://www.codewars.com/r/MWpY8w

this site's very good for practicing what you know (and learning new poo poo), gives you tasks to work on with varying levels of practicality

MrQueasy
Nov 15, 2005

Probiot-ICK

William Henry Hairytaint posted:

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

The problem with asking "what Python can do" is that given enough time and storage, you can probably do most things. (Though having done a lot with Python, I wouldn't want to do a lot of those things.)

If you're looking for academic exercises with test cases, I recommend https://exercism.io/. Lots of problems to solve that are a little more than "Grab every other letter" and a lot less than an entire project. Codewars is good too (see hbag's post above) but it might be a little overwhelming at first.

If you're confident enough with imports, try downloading the BeautifulSoup library and do some basic web scraping. (jargon: download a website's html and pull info out of it)

hbag
Feb 13, 2021

MrQueasy posted:

If you're confident enough with imports, try downloading the BeautifulSoup library and do some basic web scraping. (jargon: download a website's html and pull info out of it)

you're going to hate me for this but despite being good enough at python to easily use beautifulsoup i have only ever done my web scraping by bodging together a bash script that uses curl, html2text, and sed

MrQueasy
Nov 15, 2005

Probiot-ICK

hbag posted:

you're going to hate me for this but despite being good enough at python to easily use beautifulsoup i have only ever done my web scraping by bodging together a bash script that uses curl, html2text, and sed

Pathetic, you don't even need html2text with the power of sed.

(I've written webscrapers in all sorts of languages, and curl + egrep works better 99%)

hbag
Feb 13, 2021

MrQueasy posted:

Pathetic, you don't even need html2text with the power of sed.

(I've written webscrapers in all sorts of languages, and curl + egrep works better 99%)

yeah i realized i didnt need html2text but that was after i had already written the drat thing

wins32767
Mar 16, 2007

William Henry Hairytaint posted:

Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

This is a shockingly common class of operation when dealing with data files provided by some third party. Parsing CSV is like 30% of all the code ever written and in 20,021 when humanity has transcended mere flesh, there is still going to be code running that cleans up some garbage character(s) inserted into an otherwise normal file format.

Batterypowered7
Aug 8, 2009

The mist that chills you keeps me warm.

wins32767 posted:

This is a shockingly common class of operation when dealing with data files provided by some third party. Parsing CSV is like 30% of all the code ever written and in 20,021 when humanity has transcended mere flesh, there is still going to be code running that cleans up some garbage character(s) inserted into an otherwise normal file format.

"THIS NEEDED TO BE ENCODED IN UTF-2024!"

Plinkey
Aug 4, 2004

by Fluffdaddy

William Henry Hairytaint posted:

I've been trying to learn Python too and it's awful. Like I'm learning about lists and tuples and dictionaries and slicing and I'm just thinking: so loving what? How is this ever going to be practical? There's no real examples. Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

But it's just some exercise like "pull every 3rd character out of this 30 character string, not for any reason, just show us you can do it".

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

download a bunch of torrents or rip a bunch of dvds or something, write a python script to try and figure out if they need to be re-encoded (mp4 vs x264 x265 or whatever) using hand break or something, then move them them to another 'archive' drive/folder only if half of some arbitrary amount of gigs (by total folder file size) were last modified more than a week ago, moving by date descending.

Congrats, you can now prioritize moving logs around and zipped them up for archiving to 'cold' drives instead of 'hot' drives

You also basically just built a DVR in python.

e:

Incoming Folder -> Encode Folder -> Live in the last week -> zip/compress -> Archive

Plinkey fucked around with this message at 04:31 on Mar 25, 2021

heehee
Sep 5, 2012

haha wow i cant believe how lucky we got to win :D

William Henry Hairytaint posted:

I've been trying to learn Python too and it's awful. Like I'm learning about lists and tuples and dictionaries and slicing and I'm just thinking: so loving what? How is this ever going to be practical? There's no real examples. Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

But it's just some exercise like "pull every 3rd character out of this 30 character string, not for any reason, just show us you can do it".

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

yea exactly lol

Plinkey
Aug 4, 2004

by Fluffdaddy

MrQueasy posted:

If you're confident enough with imports, try downloading the BeautifulSoup library and do some basic web scraping. (jargon: download a website's html and pull info out of it)

I think something similar was the first thing that i built in python past a hello world and stuff like that, it was before This American Life had an app, and you could scrape all of the MP3s from their site based on episode id or something. So I used something like BS and some MP3 labeling library to download and tag names/descriptions in the mp3 metadata for all like 400 (at the time) episodes

Methanar
Sep 26, 2013

by the sex ghost

William Henry Hairytaint posted:

I've been trying to learn Python too and it's awful. Like I'm learning about lists and tuples and dictionaries and slicing and I'm just thinking: so loving what? How is this ever going to be practical? There's no real examples. Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

But it's just some exercise like "pull every 3rd character out of this 30 character string, not for any reason, just show us you can do it".

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

python can do anything.

get data somehow from somewhere, including user input, and present it in a useful way on a screen.

There you go that's all code every written, aside from like robots I guess.

Batterypowered7
Aug 8, 2009

The mist that chills you keeps me warm.

It's loops and conditional statements all the way down.

1337JiveTurkey
Feb 17, 2005

If we're being honest slices end up early in Python tutorials because they're trying to convince programmers from other languages that it's less of a pain in the rear end to use. If you're writing some sort of short script that's chopping the extension off a bunch of file names to figure out what to do with them, filename[-3:] and you're done.

Methanar
Sep 26, 2013

by the sex ghost

1337JiveTurkey posted:

If we're being honest slices end up early in Python tutorials because they're trying to convince programmers from other languages that it's less of a pain in the rear end to use. If you're writing some sort of short script that's chopping the extension off a bunch of file names to figure out what to do with them, filename[-3:] and you're done.

>>> filename='test.jpeg'
>>> filename[-3:]
'peg'
>>>

1337JiveTurkey
Feb 17, 2005

Methanar posted:

>>> filename='test.jpeg'
>>> filename[-3:]
'peg'
>>>

It's for scripts. New programmers shouldn't assume that anything has an extension of more than three characters.

Methanar
Sep 26, 2013

by the sex ghost

1337JiveTurkey posted:

It's for scripts. New programmers shouldn't assume that anything has an extension of more than three characters.

code:
ubuntu@Methanar:/mnt/d/Libraries$ ls -laR | grep -E '[a-zA-Z0-9]+\.[a-z0-9]{4,}+$'
PS C:\Users\Methanar> bash
An existing connection was forcibly closed by the remote host.
PS C:\Users\Methanar> bash
The process cannot access the file because it is being used by another process.

lol I was messing around to see how many files I could find with 4 or more character extensions to make a point and I caused wsl to crash

anyway I don't agree with giving people overly naive ways of solving problems like just assuming the last 3 characters are an extension.

example.json

Methanar fucked around with this message at 07:33 on Mar 25, 2021

Plinkey
Aug 4, 2004

by Fluffdaddy
Honestly python is the second worst way to learn to program behind Javascript

Pick it up after you can think in something strongly typed.

Methanar
Sep 26, 2013

by the sex ghost

Plinkey posted:

Honestly python is the second worst way to learn to program behind Javascript

Pick it up after you can think in something strongly typed.

why taint yourself with procedural/OO trash at all when you could instead learn to program properly with haskell, the way god intended

Methanar fucked around with this message at 07:42 on Mar 25, 2021

Plinkey
Aug 4, 2004

by Fluffdaddy

Methanar posted:

why taint yourself with procedural/OO trash at all when you could instead learn to program properly with haskell

Just write 100 line line linq statements instead of learning sql plans

MrQueasy
Nov 15, 2005

Probiot-ICK

Methanar posted:

why taint yourself with procedural/OO trash at all when you could instead learn to program properly with haskell, the way god intended

Why taint yourself with Functional/Monad trash at all when you could instead learn to program properly with Prolog, the way god intended

fatelvis
Mar 21, 2010

William Henry Hairytaint posted:

I've been trying to learn Python too and it's awful. Like I'm learning about lists and tuples and dictionaries and slicing and I'm just thinking: so loving what? How is this ever going to be practical? There's no real examples. Show me an example of when I'm going to need to be able to pull the 9th character out of a sentence or whatever stupid poo poo you're having me do.

But it's just some exercise like "pull every 3rd character out of this 30 character string, not for any reason, just show us you can do it".

Just walk me through something that's of marginally more use than a loving tic tac toe game so I understand what Python can do and WHY I MIGHT WANT TO DO IT :mad:

I had this issue when I was first learning. For me, I had to figure out something I wanted to do, and then try and do it.

So for example, I wanted to pull a bunch of stuff off a site, process it, then show it on a front-end. This led me to leaving webscraping, database access and threads for processing, then flask/websockets for showing the front-end.

Whenever I tried to 'just learn' any programming language, I always failed horribly.

Computer viking
May 30, 2011
Now with less breakage.

MrQueasy posted:

Why taint yourself with Functional/Monad trash at all when you could instead learn to program properly with Prolog, the way god intended

Why taint yourself with all this interpreted or compiled trash when you can write proper assembly yourself, like God and Intel intended

Adbot
ADBOT LOVES YOU

Batterypowered7
Aug 8, 2009

The mist that chills you keeps me warm.

Computer viking posted:

Why taint yourself with all this interpreted or compiled trash when you can write proper assembly yourself, like God and Intel intended

It was good enough for the Gameboy and the SNES!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply