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.
 
  • Locked thread
Valeyard
Mar 30, 2012


Grimey Drawer

Ploft-shell crab posted:

are you defining the datatype? you can use record syntax to give your fields names.

naming them yes. the problem was that I have a map, with strings as keys, and datatype X as values. but when I print out the map, it prints out datatype X as a monstrosity.

for no, https://zuttobenkyou.wordpress.com/2011/02/27/simple-haskell-data-pretty-printing/ , this was quick enough to setup and is ok to use for tests so far

Valeyard fucked around with this message at 05:23 on Nov 20, 2014

Adbot
ADBOT LOVES YOU

Space Whale
Nov 6, 2014
Through CTCI, brain teasers, code rust, being good at selling myself, and being acceptable at code monkey things, I managed to get myself a mid level job. Woo hoo!

As such I'm now exposed to stuff like the actual ISS server and the messaging queue and other things that are beyond just "poke around project, mash F12, and do what BA says, and make sure stylecop is happy." I actually feel that "oh poo poo I'm a faker" feeling again, which means I'm learning.

What do you DO to really get all this stuff besides ask questions, stay late and buddy up to the IT guys?

Shaggar
Apr 26, 2006

uncurable mlady posted:

Mac OS X is the worlds best operation system

lol

MeruFM
Jul 27, 2010

MALE SHOEGAZE posted:

didnt that happen like 2 years ago

apparently still an issue

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Seaside Loafer posted:

That would be a good idea in theory but since nobody had already done it for the thing (wish I could remember what it was) the company couldnt really embark on a project to emulate it could they, that would have been more difficult than the actual project. If I get a brainwave and remember what model it was i'll post it. it was (is for another 5 years at least according to the contract) a 'mini-computer' haha, of some sort http://en.wikipedia.org/wiki/Minicomputer

one of my dad's friends wrote Ada for one of these things for the navy in the 80s and went crazy. makes you think.

Notorious b.s.d. posted:

I don't expect luigi thirty to pull himself up by his bootstraps or fix everything in his life at once or magically stop being sadbrains tomorrow

just a job search for your first job is a bad place to "phone it in." even a depressed person must make choices where to apply greater or lesser effort, and your first job search is a place where more is better.

i did try rewriting my resume again and sending out more applications in the last 2 days than in the preceding month so let's see how that goes. surely if i can teach myself enough 6502 assembly to write YOSPOS.BIN i can obtain enough c# skills (which i have used for about a year) and python skills (which i have used for several years) to impress some interviewer.

fart simpson posted:

just keep in mind that study that showed interviewers mostly make up their minds in the first 10 seconds of the interview, before you even speak.

I am white, therefore

hobbesmaster posted:

the tough love "power through" speeches will work if you don't have clinical depression and are just feeling bad. if you do have clinical depression it just comes off as "oh, I'm completely worthless it is completely impossible for me to do that" and things get worse

i feel that way and i know it is irrational but i can't stop feeling that way! that is the worst part. sometimes i have a breakthrough and end up hyper-focused working 16 hours a day on some dumb project that's as likely to be useful (a win8 app or django site i can show off) as not useful (a commodore 64 tf2 crate unboxing program or YOSPOS.BIN).

qntm
Jun 17, 2009

VLADIMIR GLUTEN posted:

Hahaha what the hell is fonzsort? Does it involve jukebox punching?

fonzsort is when you go up to sort the array, but it's already sorted because you're just that awesome, eyyy

gonadic io
Feb 16, 2011

>>=

Valeyard posted:

naming them yes. the problem was that I have a map, with strings as keys, and datatype X as values. but when I print out the map, it prints out datatype X as a monstrosity.

for no, https://zuttobenkyou.wordpress.com/2011/02/27/simple-haskell-data-pretty-printing/ , this was quick enough to setup and is ok to use for tests so far

it's possible to override show, but it's much better to just write your own printing function and call it something else, which is pretty much what ppShow does. sadly there's not a full debugger for haskell, but the most common tool to use is the function trace from the library Debug.Trace which bypasses the type system to print values from inside functions. it's a little finicky to use due to laziness, by far the easiest way to use is to put trace at the top level of a definition like 'function = trace string retVal' so the string is printed whenever the function is called

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Seaside Loafer posted:

That would be a good idea in theory but since nobody had already done it for the thing (wish I could remember what it was) the company couldnt really embark on a project to emulate it could they, that would have been more difficult than the actual project. If I get a brainwave and remember what model it was i'll post it. it was (is for another 5 years at least according to the contract) a 'mini-computer' haha, of some sort http://en.wikipedia.org/wiki/Minicomputer

IBM holds a ton patentns on stupid poo poo and will sue your rear end into oblivion if you attempt to virtualize it w/o paying them

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

AlsoD posted:

it's possible to override show, but it's much better to just write your own printing function and call it something else, which is pretty much what ppShow does. sadly there's not a full debugger for haskell, but the most common tool to use is the function trace from the library Debug.Trace which bypasses the type system to print values from inside functions. it's a little finicky to use due to laziness, by far the easiest way to use is to put trace at the top level of a definition like 'function = trace string retVal' so the string is printed whenever the function is called

yeah just write your own function HugeDataType -> String and then another that wraps that Map -> String something like this:
code:
data Crap = Crap Int Float String [Float]
data MoreCrap = MoreCrap String Crap

showCrap :: Crap -> String
showCrap (Crap _ theThingYouWant _ _) = show theThingYouWant

showMoreCrap : MoreCrap -> String
showMoreCrap (MoreCrap s crap) = "MoreCrap " ++ s ++ " " ++ showCrap crap
idk that's the general way i'd do it

gonadic io
Feb 16, 2011

>>=
also trace is one of the functions which tell the type system to gently caress off. other fun ones include unsafePerformIO :: IO a -> a which masks a method's side effects from the type system (trace is defined in terms of this or something similar) and unsafeCoerce :: a -> b. yes that's any a and any b. i think it's depreciated in favour of a more nuanced solution involving the compiler working out which things are safe to coerce into each other as it's main usecase was swapping between collections of newtypes (which have the same internal representation as each other, this was NOT checked by the compiler) without having to traverse the collection itself

Moist von Lipwig
Oct 28, 2006

by FactsAreUseless
Tortured By Flan

qntm posted:

fonzsort is when you go up to sort the array, but it's already sorted because you're just that awesome, eyyy

eyyy lmao

Notorious b.s.d.
Jan 25, 2003

by Reene

Malcolm XML posted:

IBM holds a ton patentns on stupid poo poo and will sue your rear end into oblivion if you attempt to virtualize it w/o paying them

ibm missed the boat on minicomputers. nobody bought s/36 or s/38. like, when the word "minicomputer" was a thing people said, ibm was not in the market.

ironically they then developed the s/38 architecture into the wildly popular as/400 in the 90s. people think of as/4040 as an archaic 1970s thing when in reality it had all its growth from like 1992 to 2000

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

Space Whale posted:

Through CTCI, brain teasers, code rust, being good at selling myself, and being acceptable at code monkey things, I managed to get myself a mid level job. Woo hoo!

As such I'm now exposed to stuff like the actual ISS server and the messaging queue and other things that are beyond just "poke around project, mash F12, and do what BA says, and make sure stylecop is happy." I actually feel that "oh poo poo I'm a faker" feeling again, which means I'm learning.

What do you DO to really get all this stuff besides ask questions, stay late and buddy up to the IT guys?

read up on it, i guess? No better way to learn a specific system than to get balls deep, tho

You're doing great :unsmith:

e- also remember that almost nobody is as good as X as you think they are, they are just a little bit better/have a bit more experience so don't be too intimidated

Space Whale
Nov 6, 2014
Any good IIS sources besides msdn?

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
Thinking pretty hard about committing some truly bad code.

Either that or spend 2 weeks working on a system i don't want to work on

Soricidus
Oct 21, 2010
freedom-hating statist shill
whenever I want to commit a bad code I change my git config to use my boss's name and email, works pretty well

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Soricidus posted:

whenever I want to commit a bad code I change my git config to use my boss's name and email, works pretty well

cool idea

DimpledChad
May 14, 2002
Rigging elections since '87.
what thread are we in??? whenever i commit bad code i just check it into the repo. when i commit good code, i pop a bottle of bubbly and reward myself with a well-earned mani pedi

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
has anyone ever committed good code?

Moist von Lipwig
Oct 28, 2006

by FactsAreUseless
Tortured By Flan

bobbilljim posted:

has anyone ever committed good code?

https://github.com/mapmeld/profanity65

DimpledChad
May 14, 2002
Rigging elections since '87.
i commit code in the same way that one might commit murder

Luigi Thirty
Apr 30, 2006

Emergency confection port.

bobbilljim posted:

has anyone ever committed good code?

Bitcoin

Bloody
Mar 3, 2013

i took some objects and denormalized them into a database

getting them into and out of the database is such a mess

i have to hit like four different tables to get all the crap out

is this an impotence mismatch

should i be using mongoloid database

Bloody
Mar 3, 2013

i literally thought lol gently caress it ill just serialize these objects to blobs and stuff them in the database but then i thought

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

Bloody posted:

i took some objects and denormalized them into a database

getting them into and out of the database is such a mess

i have to hit like four different tables to get all the crap out

is this an impotence mismatch

should i be using mongoloid database

this is a normal way to use a relational db. a lot of times people denormalize to some extent though. depends on the situation but there's not really an easy way with dbs

Bloody
Mar 3, 2013

well its a pain in the rear end and it makes my code look like poo poo. if this was an orm it would be an ienumerable and i could just waltz into the sunset.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Why do you care what the code that actually accesses the db looks like? I mean yeah it's a shitpile of querying multiple tables and munging the results into some objects, but it's not like that interferes with your real code so who cares?

OTOH if that stuff is leaking into your business logic somewhere you done hosed up.

jesus WEP
Oct 17, 2004


just use stored procs and then ur messy sql queries will be on the db where they belong

power botton
Nov 2, 2011

St Evan Echoes posted:

just use stored procs and then ur messy sql queries will be on the db where they belong

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

St Evan Echoes posted:

just use stored procs and then ur messy sql queries will be on the db where they belong

+1

Lord Of Texas
Dec 26, 2006

Jabor posted:

Why do you care what the code that actually accesses the db looks like? I mean yeah it's a shitpile of querying multiple tables and munging the results into some objects, but it's not like that interferes with your real code so who cares?

OTOH if that stuff is leaking into your business logic somewhere you done hosed up.

Database objects change, unmanageable SQL is technical debt just like any other code

St Evan Echoes posted:

just use stored procs and then ur messy sql queries will be on the db where they belong

Yuck, please don't do this (even if you are using database source control like Liquibase it's decades behind even the worst typical VC)

If you are in some utopia where you never have to maintain code ever than yeah go ahead

Shaggar
Apr 26, 2006
stored procs are the way to go.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shaggar posted:

stored procs are the way to go.

just don't call them "sprocs", because it irritates me :mad:

jesus WEP
Oct 17, 2004


shaggar was right
i got that stored proc wisdom from him itt and its served me well ever since

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Lord Of Texas posted:

Yuck, please don't do this (even if you are using database source control like Liquibase it's decades behind even the worst typical VC)

If you are in some utopia where you never have to maintain code ever than yeah go ahead

Maintaining a small codebase without liquibase is just fine if you don't make frequent changes to your schemas and for the rest liquibase is more than adequate.

Database code belongs in the database and should be properly version controlled just like any other code hth

Shaggar
Apr 26, 2006
Microsoft should add automatic schema versioning to sql server

Lord Of Texas
Dec 26, 2006

Janitor Prime posted:

Maintaining a small codebase without liquibase is just fine if you don't make frequent changes to your schemas and for the rest liquibase is more than adequate.

Database code belongs in the database and should be properly version controlled just like any other code hth

I guess part of it depends on your setup - if you as a developer have full control over your database AND it rarely changes AND your codebase is small, then just do whatever. Where I'm at, due to decisions out of my control my app is sharing a database which changes frequently so maintaining hundreds of stored procs that change frequently via Liquibase as opposed to in SVN would be a loving nightmare.

(also Liquibase does not handle stored procs particularly well anyway, I've heard Datical does a better job but we're still on the open source LB)

quote:

Database code belongs in the database and should be properly version controlled just like any other code hth

Unless you're in a land where you hand a database to end users, the line drawn between database code and application code is pretty much irrelevant, put it where it's the most maintainable (in traditional VC.) It's like shoving all of your validation into your presentation because "that's where it belongs!!!", then you end up with an untestable (by anything but manual tests or Selenium) unmaintainable mess.

Careful Drums posted:

what parm do you need for that sproc? :barf:

I don't see "sproc" much but goddamn "parm" is obnoxious. Type the stupid extra a

Lord Of Texas fucked around with this message at 17:34 on Nov 21, 2014

Careful Drums
Oct 30, 2007

by FactsAreUseless

prefect posted:

just don't call them "sprocs", because it irritates me :mad:

what parm do you need for that sproc? :barf:

Shaggar
Apr 26, 2006
database code belongs in the database, not in your application.

Adbot
ADBOT LOVES YOU

Lord Of Texas
Dec 26, 2006

Shaggar posted:

database code belongs in the database, not in your application.

why

  • Locked thread