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
AggressivelyStupid
Jan 9, 2012

simble posted:

you just need enough reputation and you can do stuff

https://stackoverflow.com/help/privileges

if you dont have enough fake points it gets put into a queue where its approved/denied by morons with enough points

Adbot
ADBOT LOVES YOU

FlapYoJacks
Feb 12, 2009

Shaggar posted:

setting specific versions for libraries is pretty normal and allows you to build the same thing again reliably. allowing any version can introduce unexpected changes in functionality

There is nothing in the code that requires super specific versions, and even if a new version of a dependency library broke something, I would then agree to do a <= on the requirement. Or fix the issue and update the version.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
okay, but how is carrying on using the version that worked yesterday suddenly going to break things?

brand engager
Mar 23, 2011

Lutha Mahtin posted:

is this the first time you've encountered an inversion-of-control MVC framework? i had a similar reaction when i first tried to learn android but it makes more sense the more you read about how apps work in android. either way it's how the android API is structured so you will pretty much have to learn to live with it

the dependency injection stuff, it depends on a number of factors whether it is good or not (i don't have a lot of experience with this). there are a lot of valid reasons for an android app to use one but again it depends on the specifics

I've seen MVC stuff before but this setup feels excessively abstracted. We've got a settings activity that dynamically loads in some SettingsFragments and SettingsSomethingFragments inside there too. The injection stuff and magic view binding annotations on top of all that make it hard to see where the stuff that gets put into the view is even specified. If it was regular code I could use the IDEs find usages search or similar, but magic @ annotations seem to mess that up since they generate code at build-time. Anyways the stuff I was looking for ended up being in an xml config file that wasnt mentioned in any of the view or presenter classes

floatman
Mar 17, 2009
I think when it comes to abstraction, people tend to focus on how the abstraction is done rather than what the abstraction achieves.
I.e. good abstraction: you get in your car and can accelerate, turn left, right, break etc without actually knowing how your car works.
Most software abstraction: you get into the car and there's two buttons only, "OFFICE" and "AIRPORT". you're now tasked to build a machine that will alternatively hit both buttons until you reach "SHOPPING CENTRE". You cannot build a third button because if you do, you might as well build a new car. A co-worker is on a tricycle screaming about microservices.

brand engager
Mar 23, 2011

The list of menus and submenu options are all unchanging so this system of loading in fragments and then replacing them with new ones when you travel into the menu hierarchy didnt need to exist

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

YOSPOS: A co-worker is on a tricycle screaming about microservices.

Sapozhnik
Jan 2, 2005

Nap Ghost
python and its community are trash

if they took interface stability seriously they wouldn't have created an incompatible new revision of the language and then immediately set about killing the old one that people were foolishly depending on

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Dijkstracula posted:

YOSPOS: A co-worker is on a tricycle screaming about microservices.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Dijkstracula posted:

YOSPOS: A co-worker is on a tricycle screaming about microservices.

DrPossum
May 15, 2004

i am not a surgeon

Chalks posted:

Commit messages that link to the work item/ticket they were assigned is always useful no matter how terrible the developer. When ever you find insane code, you always want to know what they were trying to achieve when they did it.

So many times I've been looking at some huge obvious problem caused by some commit and thinking that the code is complete nonsense, but when I go to check the work item associated with it I suddenly understand what they were struggling with - and the fix I was just about to make would have re-broken the scenario they'd fixed.

Gonna emptyquote this

Zlodo
Nov 25, 2006

Shaggar posted:

setting specific versions for libraries is pretty normal and allows you to build the same thing again reliably. allowing any version can introduce unexpected changes in functionality

shaggar was right

Soricidus
Oct 21, 2010
freedom-hating statist shill

Shaggar posted:

wales, Scotland, etc.. are more like counties than states.

please tell us more about how our own kingdom works, o wise foreigner :allears:

gonadic io
Feb 16, 2011

>>=
can't wait to get my Scottish passport within the year, giving me the full trifecta

Back to my twitter stuff: since there's no processing I'm not actually convinced doing the auth serverside and then the calls clientside will really save me much bandwidth. Like how big is a request with no body?

E: I guess one advantage to doing it clientside would be that the user auth can stay loaded in the js, no need for it to be on the server

gonadic io fucked around with this message at 09:37 on Mar 21, 2019

Aramoro
Jun 1, 2012




Soricidus posted:

please tell us more about how our own kingdom works, o wise foreigner :allears:

Lets give it a year and see how that holds out.

mystes
May 31, 2006

Sapozhnik posted:

python and its community are trash

if they took interface stability seriously they wouldn't have created an incompatible new revision of the language and then immediately set about killing the old one that people were foolishly depending on
Where "immediately" means "over 10 years".

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER

if only the death of python 2 had been immediate

AggressivelyStupid
Jan 9, 2012

Soricidus posted:

please tell us more about how our own kingdom works, o wise foreigner :allears:

not very well

cinci zoo sniper
Mar 15, 2013





depends if its main output product is or isn’t laughter

cinci zoo sniper
Mar 15, 2013




also angloboos need to remember that england etc are countries in interpretation of local laws only, where uk is centre of the galaxy. for everyone else uk is one country, at least until march 29

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



one would think i wrote these forums in flask in a half hour

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

cinci zoo sniper posted:

also angloboos need to remember that england etc are countries in interpretation of local laws only, where uk is centre of the galaxy. for everyone else uk is one country, at least until march 29

wait what's happening march 29? is this something to do with brexit?

cinci zoo sniper
Mar 15, 2013




Finster Dexter posted:

wait what's happening march 29? is this something to do with brexit?

yeah, the current deadline. if nothing changes they are gtfo’d from eu with no agreements on that day

Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

cinci zoo sniper posted:

yeah, the current deadline. if nothing changes they are gtfo’d from eu with no agreements on that day

yikes

good luck, uk friends :ohdear:

Gazpacho
Jun 18, 2004

by Fluffdaddy
Slippery Tilde
Holy cow I sure do like programming with strings. Whose dumb idea was it to invent other types?

mystes
May 31, 2006

Gazpacho posted:

Holy cow I sure do like programming with strings. Whose dumb idea was it to invent other types?
Welcome to the terrible programming thread! Languages where everything is a string sure are great!

elite_garbage_man
Apr 3, 2010
I THINK THAT "PRIMA DONNA" IS "PRE-MADONNA". I MAY BE ILLITERATE.
The real fun begins when you have to come up with your own string implementation.

Doom Mathematic
Sep 2, 2008

Gazpacho posted:

Holy cow I sure do like programming with strings. Whose dumb idea was it to invent other types?

This is called "stringly typed" programming.

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
this may sound dumb but I like ruby's distinction of strings and symbols

gonadic io
Feb 16, 2011

>>=

Symbolic Butt posted:

this may sound dumb but I like ruby's distinction of strings and symbols

Scala technically has this too

code:
val fooVal = "foo"
val BarVal = "bar"

def butt(input: String): Unit = {
  input match {
     case BarVal => println(s"found bar")
     case fooVal => println(s"found foo")
     case _ => println(s"found nothing")
  }
}

butt("foo") // prints found foo
butt("bar") // prints found bar
butt("baz") // prints found foo

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



wtf

gonadic io
Feb 16, 2011

>>=
These days you do at least get the warning: suspicious variable shadowing by wildcard match 'fooVal' or something

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



but why does butt("baz") match foo??

ComradeCosmobot
Dec 4, 2004

USPOL July

Krankenstyle posted:

but why does butt("baz") match foo??

I assume BarVal is interpreted as a constant value and therefore the case statement matches only when exactly equal, while fooVal is interpreted as a variable name, and bound to “baz” as a result of Scala’s pattern matching case statement.

Hard-coding variable/constant naming conventions as a behavioral difference seems dumb and bad to me in a way syntactically significant white space could only dream of but hey, forget it Jake, it’s Scalatown.

gonadic io
Feb 16, 2011

>>=

Krankenstyle posted:

but why does butt("baz") match foo??

This isn't the horror, although it is a bit surprising if you haven't done much pattern matching. It's the same as if that line was "val fooVal = input", you're making a new value which shadows the old one.

The horror is that this behavior changes depending on if the name starts with a capital or not since that's how a symbol is specified. As comradeCosmobot said, symbols (and string literals) match exactly.

cinci zoo sniper
Mar 15, 2013




ComradeCosmobot posted:

I assume BarVal is interpreted as a constant value and therefore the case statement matches only when exactly equal, while fooVal is interpreted as a variable name, and bound to “baz” as a result of Scala’s pattern matching case statement.

Hard-coding variable/constant naming conventions as a behavioral difference seems dumb and bad to me in a way syntactically significant white space could only dream of but hey, forget it Jake, it’s Scalatown.

now once more but slower

gonadic io
Feb 16, 2011

>>=

gonadic io posted:

These days you do at least get the warning: suspicious variable shadowing by wildcard match 'fooVal' or something

In fact you might even get another warning that the third case can never be reached

gonadic io
Feb 16, 2011

>>=

cinci zoo sniper posted:

now once more but slower

The fooVal at the top and the fooVal in the match are entirely unrelated. This is fairly typical behavior in flangs, and if you replace the match with a val or variable declaration, I would say most langs would behave the same

gonadic io fucked around with this message at 20:30 on Mar 21, 2019

ComradeCosmobot
Dec 4, 2004

USPOL July
the hosed up part, as gonadic io pointed out, is that the only reason it doesn’t work for BarVal is that the capitalized first letter (and only the capitalized first letter) makes it a symbol/constant and therefore it won’t be reassigned by the pattern match

most other languages do something sane like having an sigil or explicit quoting mechanism like the apostrophe in ‘BarVal in Scheme (and Lisp?) or the colon in :BarVal in Ruby.

Scala, being Scala, happens to make this call based on whether or not the first letter is capitalized.

Adbot
ADBOT LOVES YOU

cinci zoo sniper
Mar 15, 2013




gonadic io posted:

The fooVal at the top and the fooVal in the match are entirely unrelated. This is fairly typical behavior in flangs, and if you replace the match with a val or variable declaration, I would say most langs would behave the same

oh right I get what you mean

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