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
Finster Dexter
Oct 20, 2014

Beyond is Finster's mad vision of Earth transformed.

MALE SHOEGAZE posted:

in other news i'm am learning so much from this emulator101 tutorial it's crazy. i keep having big eureka moments and i've only finished the disassembler.

:siren: everyone should go learn a bit of assembly :siren:

Does that assembly game count? The one with different locks you have to program your way into. I can't remember the name of it now.

e: oh here it is: https://microcorruption.com/

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=
im playing exapunks the new zachtronics game instead. it's basically a very dumbed down assembly

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Finster Dexter posted:

Does that assembly game count? The one with different locks you have to program your way into. I can't remember the name of it now.

e: oh here it is: https://microcorruption.com/

i dont know if this is exactly what i need, but it definitely looks good.

DONT THREAD ON ME fucked around with this message at 18:21 on Aug 11, 2018

distortion park
Apr 25, 2011


cinci zoo sniper posted:

it was mentioned by a fellow thread poster a few pages back first, so i'm toying with it. right now i agree that it is like the T bit in ETL.

the actual tech, basically, is Jinja-SQL compiler with some (havent experimented yet) schema testing capacity. since i work with analytics stuff, this is pretty good poo poo for our use case at least since isntead of writing like 2000 sloc sql script with a dozen levels deep subqueries you just lay poo poo down in a logical sequence, write basic validation tests for intermediate steps, and then you can just populate a schema on dwh with it or use it somewhere else. i really like the ability to abstract things like names and values into configs - we have a case where the same database can look differently in two different places, and i can just cross compile the script batches with different targets and provide people with wrokings cripts for everything

tl;dr in my current understanding (2 hours of work) its nothing complicated, magial, or grountbreaking. sql with jinja syntax sugar and barebones schema testing framework. my primary usecase for it is a presentable and explainable sql that can be easily replicated afterwards, since schemas are dime a dozen and representing some recursive garbage just in a bunch of straightforward selects is real nice when you need to deal with people who are not necessarily very strong in sql, or familiar with your data model, or have time and energy needed to traverse the atlass shrugged of sql scripts

I've had à look at this and still don't really get it. It seems like most of syntax benefits already exist in you just use views and ctes, and while the templating stuff could be useful how often are you actually able to reuse sql across schemas?

PleasureKevin
Jan 2, 2011

is there any good reason to learn assembly though

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

PleasureKevin posted:

is there any good reason to learn assembly though
it's cheaper than having a dominatrix step on your dilz with a golf shoe

Corla Plankun
May 8, 2007

improve the lives of everyone
its pretty soothing to write a language that literally doesn't do anything unless you tell it after using something like rails or whatever where there is a bunch of lovely "magic" happening all the time

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

PleasureKevin posted:

is there any good reason to learn assembly though

i would like to have a deeper understanding of how computers work, and i would like to pursue career paths where having a deeper understanding of how computers work is important.

PleasureKevin
Jan 2, 2011

Peeny Cheez posted:

it's cheaper than having a dominatrix step on your dilz with a golf shoe

doesn’t scare me

cinci zoo sniper
Mar 15, 2013




pointsofdata posted:

I've had à look at this and still don't really get it. It seems like most of syntax benefits already exist in you just use views and ctes, and while the templating stuff could be useful how often are you actually able to reuse sql across schemas?

thing with views and ctes (especially views) is that you need to be way better than average of an analyst to make use of them. here you just write a bunch of selects and ~magic~ coherently stitches them together. anyone who vaguely fits under "programmer who has used sql professional" will neither gain much from the tool nor is the target audience really. im in a department of analysts basically and i've yet to see a coworker use a cte. we have 8 years experience destroyer of worlds (i mean we quite literally let them write in their salary and then threw 10% extra to be sure to get them) who is defeated by an xml blob stored in a postgres database

also yes in my use case i have noticeable sql resuability. for instance, for a certain category of products we have 2 core data models, day dfoo and dbar, that evolve slowly over time with each new product of subtype foo or bar respectively. and then in dwh we have a slightly different way to group products so, say, foo1.user from prod replica will became foo_stage.user_1 inside dwh.

so yeah i have 1:1 portability of all sqls between dwh and bare replicas, and i have varying levels of sql portability within a category of products

Soricidus
Oct 21, 2010
freedom-hating statist shill

MALE SHOEGAZE posted:

i would like to have a deeper understanding of how computers work, and i would like to pursue career paths where having a deeper understanding of how computers work is important.

I take it you’re aware that all modern processors actually compile the asm down to javascript and execute that

cinci zoo sniper
Mar 15, 2013




cjs: bringing almost 4 week uphill struggle to an anticlimactic conclusion, our developers did ultimately fail to establish an sftp connection, but found out that ftp over ssl (at this point im afraid to actually know if its ftps or ???, even though i asked) works with the server in question

so the problem of "vendor provided us with broken server" that the dev team tried to poorly communicate to developer turned out to be "we are unable to adjust sshd config on prod"

i'm so tired of working with these clowns, jfc.

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

PleasureKevin posted:

doesn’t scare me
1) I know
2) u still owe me $50 deadbeat

PleasureKevin
Jan 2, 2011

i somehow agreed to do a Wordpress site a little while ago. i said we should just put it up on Heroku or my custom hosted heroku clone on a VM on my VPS. the goal was to get it deploy CI style whenever a github PR was merged.

the client said nah, they had a WP host that had ssh access. works for me.

I found a really cool wordpress CLI app that let me do all the stuff that made wordpress CI annoying, and the studio head said i should write a script locally before putting it up on Codeship/TravisCI. I actually made it pretty solid and got pretty comfortable with it.

Then before anything else, i did a bunch of work on the WP site itself. the client (a developer himself) loved it. apparently it’s easy to impress wordpress devs cause they just throw everything in “functions.php” and if you show a tiny bit of organization if blows their minds or something?

anyway then i spend the better part of a day trying to make this drat script work. hosed around with the code, the host’s GUI and eventually contacted support. apparently the client was wrong, there is no ssh after all.

a day or two later i was fired for (at least in part) for billing so many hours on that ssh/CI thing, even though it was the client that gave us the bad info.

the other issue was i had to cancel our 4th meeting with the client (again, only 1 PR was done here) cause i was working late on my other part time job that the studio OK’d me to get like 1 week before. absolutely nothing to even talk about in this remote video call anyway. he tried to walk it back later, but i just said gently caress off, i really don’t take kindly to people threatening my livelihood like that.

then he asked for a partial refund on the retainer that expired before he even got the wordpress contract.

akadajet
Sep 14, 2003

PleasureKevin posted:

is there any good reason to learn assembly though

yeah, it helps you learn what computers actually do

PleasureKevin
Jan 2, 2011

akadajet posted:

yeah, it helps you learn what computers actually do

so does putting a 9 volt battery on your tongue

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

PleasureKevin posted:

so does putting a 9 volt battery on your tongue

xor pleasurekevin

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Shaggar posted:

pls don't install stuff on a dc.

no installation, just setting up an account object in a particular way.

cinci zoo sniper posted:

goddamn that sucks. at least they do something, not like my guys “yeah we saw [but didn’t do anything until you asked] that the database went out of sync”

Sounds like our dbas... "hey we're having some performance issues and it looks like the indexes are 90% fragged, why haven't the maintenence jobs run?" "oh we don't check if they actually complete.... looks like they've been failing for 3 months" :suicide:

cinci zoo sniper
Mar 15, 2013




Powerful Two-Hander posted:

Sounds like our dbas... "hey we're having some performance issues and it looks like the indexes are 90% fragged, why haven't the maintenence jobs run?" "oh we don't check if they actually complete.... looks like they've been failing for 3 months" :suicide:
"how come this was a surprise to you, i thought you guys had database monitoring set up"
"we have it yeah but it began to throw weird errors so we stopped looking at it"

redleader
Aug 18, 2005

Engage according to operational parameters
one of my favourite phrases is "our monitoring solution has gone home for the day"

because a year or two ago, one of our ops guys wrote the only monitoring software we have. it runs on his laptop. this company has hosted sites for well over ten years.

cinci zoo sniper
Mar 15, 2013




redleader posted:

one of my favourite phrases is "our monitoring solution has gone home for the day"

because a year or two ago, one of our ops guys wrote the only monitoring software we have. it runs on his laptop. this company has hosted sites for well over ten years.

you have to be making GBS threads me :stonklol:

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

MALE SHOEGAZE posted:

can anyone recommend exercises for getting comfortable with hex, binary, and their associated operations? They make me sick to my stomach but I just need practice. I need something like that vim adventure but for binary and hex.

do all the project euler puzzles in x86 assembly. you'll be a bit flipping wizard in a few days.

problem with binary operations is that they are often processor specific, unless they are abstracted away from you by the language, but even then, shifting a 8 bit integer to the left 9 bits will always be implementation specific.

ran into that a lot when i was debugging some code on an embedded machine that was giving weird errors but when testing the expressions in GDB it seemed to be correct, because GDB implemented bit shift THIS way, and the target processor implemented bit shift THAT way, doo da doo doo

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

CRIP EATIN BREAD posted:

do all the project euler puzzles in x86 assembly. you'll be a bit flipping wizard in a few days.


jesus I can't even imagine coding a sieve of eratosthenes in assembly

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
yeah euler does not sound pleasant in assembly but i might try coding up some basic data structures

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
it's just loving tedious and easy to screw up and still has a similarly abstracted machine model as c. you don't think about cache in x86 assembler, usually. you're still dealing with virtual memory. the only difference is it it's now a massive pain to do any flow control and it's a massive pain to deal with types above machine word size. hooray

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
unless you go hard into the types of multi access intrinsics like memory or instruction barriers or you are trying to not just get it working in assembler but get it working as fast as possible by digging into the isa farther than just how to do logic you probably won't get much out of it other than remembering some garbled letters for load double word to butthole register and fart

carry on then
Jul 10, 2010

by VideoGames

(and can't post for 10 years!)

Phobeste posted:

unless you go hard into the types of multi access intrinsics like memory or instruction barriers or you are trying to not just get it working in assembler but get it working as fast as possible by digging into the isa farther than just how to do logic you probably won't get much out of it other than remembering some garbled letters for load double word to butthole register and fart

i'm executing that instruction right now !!!

redleader
Aug 18, 2005

Engage according to operational parameters

cinci zoo sniper posted:

you have to be making GBS threads me :stonklol:

nope! it's honestly pretty funny tbh

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat

Symbolic Butt posted:

jesus I can't even imagine coding a sieve of eratosthenes in assembly

code:
#include <iostream>

unsigned int isprime(unsigned int num)
{
	unsigned int esp_, t;
	
	__asm
	{
		mov esp_, esp
		mov edi, num

		cmp edi, 1
		jz _no
		cmp edi, 2
		jz _yes
		test edi, 1
		jz _no

		xor ebx, ebx ; answer

		fild num   ;
		fsqrt      ;
		fistp t    ; test 1 - sqrt(num)
		mov ecx, t ; 
		inc ecx    ;

_0:
		dec ecx      ;
		cmp ecx, 1   ; loop
		jz _yes      ; 

		mov eax, edi ;
		xor edx, edx ; divide
		div ecx      ; 

		test edx, edx ; is ecx a factor of num?
		jz _no        ; yes it is, num isn't prime
		jmp _0        ; no it's not, loop and try next factor

_no:
		mov eax, 0
		jmp __end

_yes:
		mov eax, 1

__end:
		
		mov esp, esp_
	}
}

unsigned int _main()
{
	unsigned int esp_;
	__asm
	{
		mov esp_, esp

		xor edi, edi ; found primes

		mov ecx, 1
_0:
		add ecx, 2 ; don't try even numbers

		cmp edi, 10000 ; are we done yet?
		jz _found      ; if so, jump to end

		push ecx     ; 
		call isprime ; 
		cmp eax, 1   ; check for primality
		pop ecx      ;
		jz _y        ; number is prime
			
		jmp _0       ; number isn't prime

_y:
		inc edi      ; increase found primes counter
		mov ebx, ecx ; most recently found prime
		jmp _0       ; loop

_found:
		mov eax, ebx ; return ebx

		mov esp, esp_
	}
}

int main()
{
	std::cout << _main() << std::endl;	

	return 0;
}

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord
cool! thanks for the effort, I'll study it carefully tomorrow to see if I learn anything

Ellie Crabcakes
Feb 1, 2008

Stop emailing my boyfriend Gay Crungus

CHEATING.
code:
		fistp t    ; test 1 - sqrt(num)
how is ur mom, btw?

CRIP EATIN BREAD
Jun 24, 2002

Hey stop worrying bout my acting bitch, and worry about your WACK ass music. In the mean time... Eat a hot bowl of Dicks! Ice T



Soiled Meat
i did not write this, this is from the project euler guy who answers all the questions in x86 assembly

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
Luigi30 do the Motorola 68000 version

cheque_some
Dec 6, 2006
The Wizard of Menlo Park
What would you recommend for someone who is a self-taught terrible devopsing p-langing programmer but want to become a non-terrible programmer


at the point where I can make a CRUD (more like cruddy) program, that does what I want it to, but how do I get to the point where it's something professional grade. like how do you learn how to architect programs and when to use a lookup table instead of just a bunch of if-statements, and architect using different controllers instead of all just in one main, and optimized code, and all that other stuff. It seems like there's tons of 'learn to program' sites like codeacademy and all that, but they never go beyond loops and if statements and arrays.

Are there any books or sites that teach you how to go from beginning to intermediate level?

Corla Plankun
May 8, 2007

improve the lives of everyone
how often do you fix code that you've written? or, if you dont have time to fix it, how often do you run into design choices you've made that turned out to be bad?

identifying mistakes i've made and fixing (or at least figuring out a solution for) them is how i've learned most of the stuff you're talking about

Bloody
Mar 3, 2013

i got some value from the various things on http://www.aosabook.org/en/index.html

gonadic io
Feb 16, 2011

>>=

cheque_some posted:

What would you recommend for someone who is a self-taught terrible devopsing p-langing programmer but want to become a non-terrible programmer


at the point where I can make a CRUD (more like cruddy) program, that does what I want it to, but how do I get to the point where it's something professional grade. like how do you learn how to architect programs and when to use a lookup table instead of just a bunch of if-statements, and architect using different controllers instead of all just in one main, and optimized code, and all that other stuff. It seems like there's tons of 'learn to program' sites like codeacademy and all that, but they never go beyond loops and if statements and arrays.

Are there any books or sites that teach you how to go from beginning to intermediate level?

Oo patterns are overrated

http://learnyouahaskell.com/introduction

VikingofRock
Aug 24, 2008




cheque_some posted:

What would you recommend for someone who is a self-taught terrible devopsing p-langing programmer but want to become a non-terrible programmer


at the point where I can make a CRUD (more like cruddy) program, that does what I want it to, but how do I get to the point where it's something professional grade. like how do you learn how to architect programs and when to use a lookup table instead of just a bunch of if-statements, and architect using different controllers instead of all just in one main, and optimized code, and all that other stuff. It seems like there's tons of 'learn to program' sites like codeacademy and all that, but they never go beyond loops and if statements and arrays.

Are there any books or sites that teach you how to go from beginning to intermediate level?

In addition to what other people have said, it can be pretty useful to learn by just studying what other people have done. IMO one of the best ways to do this is to find some friendly medium-sized open source project that you are interested in, go to their issues page, and pick a bug / small feature request and start working on it. Doing so will get you going through the project's code and seeing how it's laid out and organized, and you'll learn a ton from that. Plus, you'll feel really cool when they accept your pull request and you've improved the open source ecosystem in some small way.

eschaton
Mar 7, 2007

Don't you just hate when you wind up in a store with people who are in a socioeconomic class that is pretty obviously about two levels lower than your own?
another thing to look at might be things like the original “Design Patterns” and “Refactoring” books; they were both originally written as a way to explain things commonly seen rather than as prescriptions for how to work, and as such just reading through them may help you spot places where you can improve your code

one of the aphorisms from the agile community in the very early 2000s also sticks out to me given tef’s recent discussions: once, twice, refactor.

if you’re writing applications, don’t bother trying to make everything you do generic and reusable. even if you need to do it twice in one application you may not need to refactor and extract a reusable component. it’s only when you get to using it regularly—three times, four times, N times, depending on the size and specialization of your codebase—that you should think about extracting something reusable.

of course like everything there are some people who tied to codify the advice as a rule, but just looking at this stuff as guidelines and advice and things observed can help you see places to break apart the things you create in ways that will be familiar to others and therefore hopefully not cause more problems than they solve.

Adbot
ADBOT LOVES YOU

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
^^ once twice refactor is such a good rule of thumb.

cheque_some posted:

What would you recommend for someone who is a self-taught terrible devopsing p-langing programmer but want to become a non-terrible programmer


at the point where I can make a CRUD (more like cruddy) program, that does what I want it to, but how do I get to the point where it's something professional grade. like how do you learn how to architect programs and when to use a lookup table instead of just a bunch of if-statements, and architect using different controllers instead of all just in one main, and optimized code, and all that other stuff. It seems like there's tons of 'learn to program' sites like codeacademy and all that, but they never go beyond loops and if statements and arrays.

Are there any books or sites that teach you how to go from beginning to intermediate level?

i don't have good resources, unfortunately, but maybe this will help you figure out what to look for:

professional code, in the domain we're discussing, is all about writing code that can be easily evolved, maintained, and tested. additionally, it's about learning how make changes that are easily evolved, maintainable, and testable to a legacy application that is none of the above.

it's really hard to learn how to do this stuff without actually doing it, mostly because it's loving tedious and no one wants to write a tutorial that involves digging through a 400k LoC legacy enterprise app to figure out where you can safely graft in some feature.

personally, i've found the functional approach incredibly useful to me throughout my career. i dabbled in haskell very early in my programming development, and while i remember little to nothing about haskell, a few of the functional concepts stuck with me and i think they helped me a lot, even when i was working on a terrible rails app. there are very few places where you can't escape from some stateful context into a pure function.

but you also probably need to learn standard OOP and MVC.

DONT THREAD ON ME fucked around with this message at 10:18 on Aug 13, 2018

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