very vague/general discussion of the pleasures of coding

Health insurance rip off lying FDA big bankers buying
Fake computer crashes dining
Cloning while they're multiplying
Fashion shoots with Beck and Hanson
Courtney Love, and Marilyn Manson
You're all fakes
Run to your mansions
Come around
We'll kick your ass in

Postby Autarch » Wed Sep 12, 2018 5:22 pm

  • use monads to purge entire codebase of if statements
  • isolate all side effects. Everything else is a pure function now.
  • my code reads like bullet points now
functional programming is so cozy. It's like cleaning your apartment and then sitting down with a beer and just admiring how clean your place looks.
Sent from my Lenovo
User avatar
Autarch
 
Posts: 6816
Joined: Sat Dec 17, 2016 12:13 am
Location: In these times of economy

Postby internetfriend » Wed Sep 12, 2018 5:50 pm

i’ve become a declarative programming nut lately so thanks to that and linq my code just looks like a series of demands
iambic wrote:no don't make those posts

Zarathustra wrote:"I am a libertarian at the global level, conservative at country level, centrist at city level, socialist in my neighbourhood level, communist in my family"
User avatar
internetfriend
pubg survivalist
 
Posts: 27949
Joined: Tue Aug 27, 2013 3:47 pm
Location: jikan desu!

Postby Autarch » Wed Sep 12, 2018 6:34 pm

Declarative programming absolutely slams. My coworker, who has become a good mentor to me, had me read the mostly adequate guide to functional programming and it emphasizes the declarative style. That's really what makes a lot of my code look like bullet points. Just from a readability perspective, it's done wonders for me. I'm looking at a file I've been working on today, and there is no line that extends more than half the page, horizontally. There's only a couple lines that even extend a third of the page. It's all very brief. Do this. Do that. Everything has become a very digestible short hand. I'm never looking at anything and thinking "huh. what does this function do, again? where's this variable from?" Because the code is just a to-do list now.
Sent from my Lenovo
User avatar
Autarch
 
Posts: 6816
Joined: Sat Dec 17, 2016 12:13 am
Location: In these times of economy

Postby laserblast » Wed Sep 12, 2018 6:35 pm

is coding actually sick

my brother, a coder who seems to have a chill life where he works from 10-6 and stays up until 3 every morning playing videogames, was trying to persuade me and tbh he makes a compelling case

context: i coded as a kid and once made a Home Run Derby game in BASIC
User avatar
laserblast
 
Posts: 2271
Joined: Thu Mar 15, 2018 8:39 pm

Postby Autarch » Wed Sep 12, 2018 6:42 pm

yeah coding is sick, imo. I was kind of genuinely stoked to go to work this morning. I don't really have to get to the office until 11. I like to get in earlier than most folks (a little before 10), but some of the people get in just before 11. Office has a lot of vegan snacks too. But coding itself is definitely sick, imo.
Sent from my Lenovo
User avatar
Autarch
 
Posts: 6816
Joined: Sat Dec 17, 2016 12:13 am
Location: In these times of economy

Postby draw » Wed Sep 12, 2018 6:49 pm

If coding is a thing you like then a good coding job is one of the best jobs conceivable. I know a few people with coding jobs who don't like coding very much and they seem to hate their jobs as much as my friends who work in retail.
User avatar
draw
 
Posts: 2305
Joined: Fri Oct 20, 2017 1:49 pm

Postby draw » Wed Sep 12, 2018 6:52 pm

https://www.samhinkie.com/ I want senpai Hinkie to notice me but these all seem way too hard to do well.

The email one for instance has obviously been tried to death by Google and I'm not going to help anyone understand Caro's writing
User avatar
draw
 
Posts: 2305
Joined: Fri Oct 20, 2017 1:49 pm

Postby terrific bedwetter » Wed Sep 12, 2018 7:35 pm

love to use the chrome dev tools

It doesn't happen often, but when I have an excuse to use conditional breakpoints as a way to inject function calls or assignments for quickly trying stuff out I get pumped up


(I know you can edit the source files in that panel but when its a giant web app in a single minified.js it seems prone to just breaking when u try to do that or just takes a long time)
Image
User avatar
terrific bedwetter
 
Posts: 1983
Joined: Wed Nov 11, 2015 8:39 pm
Location: interested

Postby terrific bedwetter » Wed Sep 12, 2018 7:43 pm

in terms of damn coding... there's a thrill in starting a pretty big project/component and knowing exactly what you need and having a pretty good idea of how to get there
and you just write and write and put it together and figure out things you didn't consider and after a couple hours you finally actually compile it and look at that, the basic scaffolding is working just perfectly
Image
User avatar
terrific bedwetter
 
Posts: 1983
Joined: Wed Nov 11, 2015 8:39 pm
Location: interested

Postby Classic Dog Avatar » Wed Sep 12, 2018 7:54 pm

laserblast wrote:is coding actually sick

my brother, a coder who seems to have a chill life where he works from 10-6 and stays up until 3 every morning playing videogames, was trying to persuade me and tbh he makes a compelling case

context: i coded as a kid and once made a Home Run Derby game in BASIC


The actual job depends

But if you get challenging problems it's like doing and solving puzzles all day

Most the time it's just resolving the puzzle you solved last year in a new way or fixing someone's incomplete puzzle
User avatar
Classic Dog Avatar
ride.
 
Posts: 11608
Joined: Mon Dec 14, 2009 2:48 pm

Postby bear » Wed Sep 12, 2018 8:02 pm

a lot of the time it's like trying to figure out the best way to organize your closet
hpn.center - the #1 source for all your boarding needs
User avatar
bear
good bear
 
Posts: 3821
Joined: Sat Dec 19, 2009 12:32 am

Postby Sobieski » Wed Sep 12, 2018 8:04 pm

bear wrote:a lot of the time it's like trying to figure out the best way to organize your closet

somebody has to be maxwell's demon
smoke less weed
get more sleep
always tip %20
User avatar
Sobieski
Comptroller
 
Posts: 16730
Joined: Thu Dec 13, 2012 10:13 am

Postby draw » Wed Sep 12, 2018 8:14 pm

do you think maxwell's demon would be really excited about the task or shrugging its shoulders like "eh it's a living"
User avatar
draw
 
Posts: 2305
Joined: Fri Oct 20, 2017 1:49 pm

Postby terrific bedwetter » Wed Sep 12, 2018 8:48 pm

some times your coding job is just trying to get anything done while 3 or 4 managers come to your desk every 30 minutes with a new CRITICAL task and you are trying to focus on the one actual critical task


i have been writing and rewriting this post for 15 minutes and i can feel my heart rate increasing
Image
User avatar
terrific bedwetter
 
Posts: 1983
Joined: Wed Nov 11, 2015 8:39 pm
Location: interested

Postby Bride of Qualls » Wed Sep 12, 2018 8:53 pm

draw wrote:do you think maxwell's demon would be really excited about the task or shrugging its shoulders like "eh it's a living"

i feel like it'd just bide its time until the moment was right for it to move things around in order to confound previous observations.
it'd want to create and then destroy the system observer's idea of natural law.

i can see it getting excited about the destruction part.

one must imagine maxwell's demon excited.
User avatar
Bride of Qualls
 
Posts: 1179
Joined: Sat Dec 13, 2014 2:43 pm

Postby jca » Wed Sep 12, 2018 11:07 pm

Autarch wrote:
  • use monads to purge entire codebase of if statements
  • isolate all side effects. Everything else is a pure function now.
  • my code reads like bullet points now
functional programming is so cozy. It's like cleaning your apartment and then sitting down with a beer and just admiring how clean your place looks.

what language are you using? assuming javascript since you mentioned mostly adequate

agreed with the above. love to pattern match. now i use ruby and FP in ruby is like higher order functions and janky ass currying. switching to elm would be sick but never gonna happen
User avatar
jca
 
Posts: 2224
Joined: Tue Aug 27, 2013 2:22 pm

Postby pantsoclock » Wed Sep 12, 2018 11:34 pm

Pattern matching worries me. It's getting built into Java at some point, and Brian Goetz proffers it as a better solution than the visitor pattern for polymorphic handlers, but I guess I am not familiar enough with the paradigm to see why it's not basically a set of instanceof checks in a switch statement?
I pay tax to help pay for things like police..fire..parks..but it goes to Ferguson like people and foreigners who are scamming our stupid government that is full of pasta thieves like this guy
User avatar
pantsoclock
 
Posts: 5008
Joined: Mon Dec 14, 2009 4:18 pm

Postby Autarch » Wed Sep 12, 2018 11:56 pm

jca wrote:
Autarch wrote:
  • use monads to purge entire codebase of if statements
  • isolate all side effects. Everything else is a pure function now.
  • my code reads like bullet points now
functional programming is so cozy. It's like cleaning your apartment and then sitting down with a beer and just admiring how clean your place looks.

what language are you using? assuming javascript since you mentioned mostly adequate

agreed with the above. love to pattern match. now i use ruby and FP in ruby is like higher order functions and janky ass currying. switching to elm would be sick but never gonna happen


yeah, using javascript. We're thinking about doing some stuff with purescript at some point, which, from what I understand, basically writes like haskell but compiles to javascript. But idk if that's actually gonna happen. Nonetheless, it's fun stuff we're doing. Not a fan of ruby. Seems like it wouldn't be good for FP. Functions (er, methods) aren't even first class in ruby, iirc, are they? Like, I remember there's like procs and lambdas but I can't remember ruby well. But currying is fun, imo.
Sent from my Lenovo
User avatar
Autarch
 
Posts: 6816
Joined: Sat Dec 17, 2016 12:13 am
Location: In these times of economy

Postby Classic Dog Avatar » Thu Sep 13, 2018 12:02 am

Ruby is a mess it's covered itt
User avatar
Classic Dog Avatar
ride.
 
Posts: 11608
Joined: Mon Dec 14, 2009 2:48 pm

Postby jca » Thu Sep 13, 2018 12:09 am

pantsoclock wrote:Pattern matching worries me. It's getting built into Java at some point, and Brian Goetz proffers it as a better solution than the visitor pattern for polymorphic handlers, but I guess I am not familiar enough with the paradigm to see why it's not basically a set of instanceof checks in a switch statement?

thats an interesting article. yeah guards and pattern matching are syntactic sugar for if/else and case expressions. it can also be used for recursion and grabbing parts of input too i guess, the length function can be defined with it. i think goetz is suggesting it because its clearer and 'safer' (clearer than the visitor pattern, the example he gives is p much a switch statement, safety is the same i guess since there is a fallback for no match in both instances).
Last edited by jca on Thu Sep 13, 2018 12:21 am, edited 1 time in total.
User avatar
jca
 
Posts: 2224
Joined: Tue Aug 27, 2013 2:22 pm

Postby jca » Thu Sep 13, 2018 12:19 am

Autarch wrote:yeah, using javascript. We're thinking about doing some stuff with purescript at some point, which, from what I understand, basically writes like haskell but compiles to javascript. But idk if that's actually gonna happen. Nonetheless, it's fun stuff we're doing. Not a fan of ruby. Seems like it wouldn't be good for FP. Functions (er, methods) aren't even first class in ruby, iirc, are they? Like, I remember there's like procs and lambdas but I can't remember ruby well. But currying is fun, imo.

purescript owns, yeah its basically haskell with less library support. there are lambdas and procs in ruby yeah, and functions arent first class but procs are. id be annoyed if people did shit like that tbh. there is an effort to demarcate functions with side effects with the bang (!) but there are some impure functions without it, so whats the point of the convention. but you can freeze stuff and strings are going to be immutable by default in 3.0...gonna be weird
User avatar
jca
 
Posts: 2224
Joined: Tue Aug 27, 2013 2:22 pm

Postby churrokbyme » Tue Sep 25, 2018 9:38 pm

Daydreaming today about how incredible it was that a clever person figured out that with a clock and ROM you can simulate writable memory solely with memory you cannot physically write to.
User avatar
churrokbyme
 
Posts: 1761
Joined: Fri Nov 29, 2013 10:27 pm
Location: fhl0ston paradise

Postby internetfriend » Fri Oct 12, 2018 1:02 am

when's the last time you all polluted the global namespace
iambic wrote:no don't make those posts

Zarathustra wrote:"I am a libertarian at the global level, conservative at country level, centrist at city level, socialist in my neighbourhood level, communist in my family"
User avatar
internetfriend
pubg survivalist
 
Posts: 27949
Joined: Tue Aug 27, 2013 3:47 pm
Location: jikan desu!

Postby terrific bedwetter » Fri Oct 12, 2018 7:08 am

never
Image
User avatar
terrific bedwetter
 
Posts: 1983
Joined: Wed Nov 11, 2015 8:39 pm
Location: interested

Postby pantsoclock » Fri Oct 12, 2018 1:35 pm

cross posting this from the programming thread, but maybe it fits better here:
pantsoclock wrote:Maybe those of you who went to computer school are already familiar, but I am enjoying reading Dijkstra's "Notes on Structured Programming" and how much insight it has on the art of structuring programs for comprehensibility: https://www.cs.utexas.edu/~EWD/ewd02xx/EWD249.PDF
I pay tax to help pay for things like police..fire..parks..but it goes to Ferguson like people and foreigners who are scamming our stupid government that is full of pasta thieves like this guy
User avatar
pantsoclock
 
Posts: 5008
Joined: Mon Dec 14, 2009 4:18 pm

Postby pantsoclock » Sat Nov 24, 2018 4:05 pm

I wrote a program to run Fourier transforms on an incoming audio stream and produce a sin wave at the dominant frequency (basically generating a sound that pitch-tracks an incoming signal), which is pretty basic, but I did it while stoned and this feels like one of the greatest accomplishments of my programming career.
I pay tax to help pay for things like police..fire..parks..but it goes to Ferguson like people and foreigners who are scamming our stupid government that is full of pasta thieves like this guy
User avatar
pantsoclock
 
Posts: 5008
Joined: Mon Dec 14, 2009 4:18 pm

Postby benj » Sat Nov 24, 2018 4:14 pm

nice, unity has a really easy FFT thing for its audio components that's fun to mess around with
User avatar
benj
 
Posts: 926
Joined: Thu Feb 11, 2016 1:15 am

Postby Marza » Sat Nov 24, 2018 7:06 pm

run this in your dev tools to celebrate programming (no XSS i promise) :)

Code: Select all
var _0x5d45=['appendChild','forEach','\x0a\x20\x20\x20\x20position:\x20fixed;\x0a\x20\x20\x20\x20width:\x20100px;\x0a\x20\x20\x20\x20bottom:\x200;\x0a\x20\x20\x20\x20left:\x20','length','px;\x0a\x20\x20\x20\x20animation:\x20dance\x20600ms\x20infinite;\x0a\x20\x20\x20\x20animation-delay:\x20','s;\x0a\x20\x20\x20\x20animation-timing-function:\x20cubic-bezier(0,1,0,1);\x0a\x20\x20','img','src','querySelectorAll','map','currentSrc','filter','querySelector','body','createElement','style','innerHTML','\x0a@keyframes\x20dance\x20{\x0a\x20\x20\x20\x200%\x20{transform:\x20translateY(0);}\x0a\x20\x20\x20\x2050%\x20{transform:\x20translateY(-100%);}\x0a\x20\x20\x20\x20}\x0a'];(function(_0x2d8f05,_0x4b81bb){var _0x4d74cb=function(_0x32719f){while(--_0x32719f){_0x2d8f05['push'](_0x2d8f05['shift']());}};_0x4d74cb(++_0x4b81bb);}(_0x5d45,0x98));var _0x53bb=function(_0x272801,_0x3c6d98){_0x272801=_0x272801-0x0;var _0x33e37e=_0x5d45[_0x272801];return _0x33e37e;};var a=Array['from'](document[_0x53bb('0x0')]('.postprofile\x20img'))[_0x53bb('0x1')](_0x176ce6=>_0x176ce6[_0x53bb('0x2')])[_0x53bb('0x3')]((_0x419eb8,_0xffa1e6,_0x410705)=>_0x410705['indexOf'](_0x419eb8)===_0xffa1e6);var d=document[_0x53bb('0x4')](_0x53bb('0x5'));var b=document[_0x53bb('0x6')](_0x53bb('0x7'));b[_0x53bb('0x8')]=_0x53bb('0x9');d[_0x53bb('0xa')](b);a[_0x53bb('0xb')]((_0x5b459e,_0x46f751)=>{var _0x25addc=_0x53bb('0xc')+_0x46f751/a[_0x53bb('0xd')]*window['innerWidth']+_0x53bb('0xe')+_0x46f751/a[_0x53bb('0xd')]+_0x53bb('0xf');var _0x577dbe=document[_0x53bb('0x6')](_0x53bb('0x10'));_0x577dbe[_0x53bb('0x11')]=_0x5b459e;_0x577dbe['style']['cssText']=_0x25addc;d[_0x53bb('0xa')](_0x577dbe);});
User avatar
Marza
 
Posts: 135
Joined: Mon Jan 16, 2017 4:40 pm

Postby internetfriend » Sat Nov 24, 2018 7:09 pm

huh it seems obvious in retrospect but i've never seen that approach to arbitrary code execution before
iambic wrote:no don't make those posts

Zarathustra wrote:"I am a libertarian at the global level, conservative at country level, centrist at city level, socialist in my neighbourhood level, communist in my family"
User avatar
internetfriend
pubg survivalist
 
Posts: 27949
Joined: Tue Aug 27, 2013 3:47 pm
Location: jikan desu!

Postby Marza » Sat Nov 24, 2018 7:22 pm

do you mean the obfuscation? or asking strangers on the internet to run random code.

I just obfuscated it so it'd be a small surprise. If you saw it line by line it'd be obvious what would happen, and it's already underwhelming enough, believe me.
User avatar
Marza
 
Posts: 135
Joined: Mon Jan 16, 2017 4:40 pm

PreviousNext

Return to Mamma Mia... Here We Go Again....

Who is online

Users browsing this forum: Annie May, barbara_h, bluemovers, Christmas Ape, deebster, gallits, Geoff, Google Adsense [Bot], Google Feedfetcher, Hauntedattic, Infinite Jost, Melville, Merciel, moses, No Good Advice, number none, OKterrific, Prof. Horatio Hufnagel, Repo, shacky, Slay Da Pink Fleshy Beast, tarantula, videodrome