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
DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

mod saas posted:

as someone who learns by example are there demo pages or whatever that have demo code and tests for it, with explanation of how the tests were chosen and why the test runs the way it does

I understand the purpose of testing and I've done some, but I always draw blanks on what to do when I'm actually in the thick of it.

jeez, it took me years before i got used to writing test suites. nowadays it's my sop, but i still feel like i learned it by ear

one thing i can suggest, look for anything written/presented by sandi metz. a lot of her stuff is specific to ruby, but she knows the poo poo out of oop and tdd

Adbot
ADBOT LOVES YOU

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Beamed posted:

why would you write in a language which allows null pointers

because languages that don't allow null pointers* don't exist

*or an equivalent they don't call "null"

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Powerful Two-Hander posted:

lol as if we're doing pull requests and not just yoloing changes into the dev branch

use a git hook ya fuckin pelican

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Private Speech posted:

How do you git hook for commented-out code? I could specifically use it for C but it's a general question

Is there some parsing library for it? I'm sure there is but no seriously

serious answer, yeah, it's probably not possible to do with 100% accuracy

you could kinda sorta get partway there with a regexp to detect when a diff stubs existing code

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
is your mom a broken feature? cuz i heard a whitesnake cover band had her pulled off stage

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

TheFluff posted:

if you're gonna go electron you might as well go straight to vs code, it's legitimately good as hell

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Xarn posted:

People who work fully remote:

What is your substitute for a whiteboard? We are currently quite friendly around WFH, but we don't want fully remote workers because any and all teleconferencing tools we've tried are really low bandwidth compared to standing around a whiteboard and sketching out ideas.

i've been 99.9% remote for a few years and have never run into a case where we needed anything like a whiteboard in a teleconference. (i can see how it could be useful though, so maybe we're an exception)

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

DONT THREAD ON ME posted:

your git usage depends very much upon:

1. your own personal development workflow
2. the git needs of your projects

my first job was on a monolithic app with ~20 devs and i would do a lot of interactive rebases and that kind of thing. however subsequent jobs were more service/microservice oriented and it is rare to need to do anything more than branch, merge, and squash. if i needed to do a rebase today i'd have to look it up :shrug:

i used git for years before squash or rebase seemed like poo poo i might ever need. merge was plenty adequate

even now, i occasionally run into situations where merge is preferable because we don't want to lose the branch's history

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

NihilCredo posted:

a functioning human being can understand all three equally well as they mean the same thing and as a result does not care in the slightest

most attempts to apply grammatical rules to commit messages are intended to stop dipshits from submitting "asdf" and those people are already unhelpable

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
back in the early 90s i worked in a recording studio where a guy insisted on labeling his disks "dope poo poo" and "dope poo poo 2" and "dope poo poo 3" and i couldn't convince him why it was a terrible idea until he realized it on his own the hard way several months later

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
yeah, i wanna go back to that one dope beat we recorded last february...uh...help me out here...i think it was somewhere between dope poo poo 4 and dope poo poo 76

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Blinkz0rz posted:

i wish github let you add hooks on their end. i bet gh enterprise does this, right?

yeah, i was about to say i've seen git hooks work when i pushed straight to github, but then i realized the only time i saw it was a repo on a pro account

so github can definitely do it, but maybe only if you pay for it. :shrug:

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Krankenstyle posted:

well it's not even a web app yet, just cmd-line

it probably will be at some point tho, so that is useful & doesn't look too horrible. thx! I'll probably come back and whine about it in some weeks/months

ime docker is cool and good

my most insane project involves 3 separate api servers, a web app, and a client-side service app, plus a shitload of third-party requirements like redis and elasticsearch. pathological architecture aside, docker actually makes it possible for developers to run the whole stack locally with a single command. that's the worst i've experienced. in simpler scenarios like a run-of-the-mill django app with a single db, it's downright pleasant

you might run into poo poo to complain about but i bet the benefits will outweigh them significantly

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

DONT THREAD ON ME posted:

i've never understood the submodule interface.

i've never seen a problem that submodules didn't make worse

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

gonadic io posted:

I'm making a twitter app. All calls to twitter have to include both app credentials and user credentials (if you're acting on behalf if a user).

This is fine when I'm running it on my own comp, and would be fine with a server model where the user clicks an oauth thing on my page, gives me their user creds and I make the requests.

However let's say I wanted to make it clientside. The trouble is, whether I did it via a script on a page or via a browser plugin, some user would be able to access the app creds and then flaunt their rate limit to get the app banned.

Is there a way to solve this? There are other browser plugins that block people on twitter, I wonder how they handle this.

route the twitter calls from the client through your own server/web app/whatever

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

CPColin posted:

I couldn't use the proper indigenous name for one of our on-campus housing projects, yakʔitʸutʸu, because, while the web application was displaying the non-ASCII characters properly, something in the pipeline was translating them into question marks before they hit the database, where they then triggered validation errors because "yak?it?ut?u" was not a valid option.

correct me if i'm wrong, but i have a terrible feeling "not a valid option" has a drastically different meaning from "not a valid input"

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
like, i'm imagining that not only did the app mangle the name, but it broke apart the input at the ?'s and treated the result as multiple parameters

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Symbolic Butt posted:

believe it or not it's a windows machine. idk the owner tweaked the font aliasing settings I guess

shlock font syndrome

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
i've said it before, and i'll say it again

react is cool and good

typescript is cool and good

angular is flaming hot garbage. idc what version you're talking about

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
ime react is cool because it provides dirt simple integration between application state and the user interface, and jsx is a reasonable way to model it

you kinda gotta buy into react's conventions to make it work, but it can be worth the effort. use it right, it can make a lot of glue code go away

ymmv ofc

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

abigserve posted:

I was talkin trash on React but realistically I accomplished more with it in two days than I did over a much longer time period with jquery years ago when I was using that so it must be ok

also I'm poo poo at javascript so that probably doesn't help

being good at javascript doesn't help either. i'm not totally convinced that such a thing even exists. douglas crockford comes closest, and just look at how miserable it makes him

as a general rule, anything that abstracts the javascript away from you is a good thing. back in the day it was jquery. today it's react and typescript. (today it's also still jquery if you want to avoid node toolchains, which is a reasonable thing to want)

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

pokeyman posted:

jquery and react don’t really do the same thing? seems funny to compare them except as "popular JavaScript things"

they do different things but i've never run into a case where i had to use them at the same time

quote:

also you can totally use react without a node toolchain, just plop in a script tag

it's been a while since i tried that, but iirc it ran like dog poo poo. idk though, the bottleneck might have been something else

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
how much of an improvement is angular 7? it would have to be pretty goddamn significant to make me stop thinking angular is an unusable trash fire

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Blinkz0rz posted:

i came in asking this question thinking i was the terrible programmer but maybe it's u?

all programmers are terrible







































































fact

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Beamed posted:

who the hell's high school had programming courses

mine too. mostly BASIC when i was there, but sometime after i graduated they gave the programming classes responsibility for maintaining the school's website

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

HoboMan posted:

my new job will pay for it so can anyone recommend a tutorial service?

if your job is paying for it, the correct answer is college

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof
99 times out of 100 i'd rather work with a shallow api on top of raw sql than an orm

the 1 time an orm works falls apart like 1 business requirement later

but there's often a reasonable sql builder solution somewhere between raw sql strings and a full blow orm

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Corla Plankun posted:

lmfao i remember switching to python and thinking it was the best poo poo ever that .join() existed so i didnt have to janitor endings anymore

uhh

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Luigi Thirty posted:

I meant just writing an interpreter that compiles to version 3 Z-code based on the specs that exist

I know that Z-machine’s been reversed for years, ZIL hasn’t (there’s an OSS compiler)

doesn't inform 6 compile zil code? i was under the impression that it worked with the original source for zork

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

pseudorandom name posted:

the Infocom source dump claims that the compiler for that source no longer exists

not the original compiler, but i thought inform was (mostly) compatible

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Krankenstyle posted:

three! my sister uses it for her arts/crafts stuff

four! one of my ex-gfs uses it to keep track of beauty products she likes

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

akadajet posted:

some of us are actually just interested in building apps instead of new frameworks, op

and we can't wait to get those apps started after we're done gluing together a usable framework from 300 disparate node dependencies

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Oneiros posted:

last time i installed/ran our front-end service locally it was over two gigs on disc and the npm dependency list was over 1000 lines long. it takes about five to ten minutes to bootstrap and basically makes my dev machine unusable while doing so.

gently caress web development

try running create-react-app if you're curious what a 200mb hello world looks like

the package-lock.json is 643kb

i actually like react but holy poo poo the create-react-app scaffold is unrepentant garbage

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

HoboMan posted:

aaaaaaaand im hired


DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Powerful Two-Hander posted:

this is the future that orm developers want

orm developers, no

orm users, probably

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Share Bear posted:

oh good i'm not the only one

i have nothing to add, it just makes it harder to find out where work is being done when you're fixing a bug


I don't get it, like cant the function take a db connection as an argument? Why is this more useful?

that's dependency injection in its most basic form

your function doesn't care what the db does, it just expects the argument to understand a particular interface

if it's done well, it doesn't matter if the db behind the argument is sqlite, mysql, or mongo

(nota bene: it's never done well, but it's often better than nothing)

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Jabor posted:

those complaining often point at toy examples, and yeah it often looks a bit silly in toy examples

anyway the reason you might want a di framework is that your function has a dependency on like 40 different components, and if you had to explicitly pass in those dependencies every time it'd obscure what the actual arguments to the function were. your di framework separates the dependency graph from the call graph, so you can look at them separately.

if it's hard to figure out the exact source of an injected thing then someone is being too clever for their own good.

all very true, but that last sentence explains why a lot of di frameworks suck

(sometimes not the framework itself, but the implementation of it. either way it sucks)

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

MononcQc posted:

I'm not an expert at OO design, but I've been feeling more and more that data types should act as a contract, and be kept separate from the transformations that are applied to them. Conflating both within classes that act both as types and behaviours appears to couple everything too tightly for my liking.

sometimes it's more useful to model objects' behaviors than the objects that perform them. this is an idea that a lot of oo tutorials fail to consider

like, a tutorial might tell you to start by modeling `animal` and extending `dog`, `cat`, and `mouse`. Depending on what you're trying to do, the animal classes might be insignificant (i.e., little more than data structures), and the poo poo you really want to model are the interactions between dog/cat, dog/mouse, and cat/mouse

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Captain Foo posted:

in this example, then, an Animal is an identifier and a Chases property, which takes another Animal

?

like, instead of Animal objects having a chase() method, you have a Chase object with chaser() and chased() properties

idk, probably not the best example. i just wanted to point out that objects representing concrete things (Animal, Vehicle) are sometimes less useful than objects representing what they do (Chase, Trip)

Adbot
ADBOT LOVES YOU

DaTroof
Nov 16, 2000

CC LIMERICK CONTEST GRAND CHAMPION
There once was a poster named Troof
Who was getting quite long in the toof

Wheany posted:

as time goes by, the number of quotation marks around the word developers increases

there must be some reason that happens, but i haven%E2%80%99t figured it out yet

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