« first day (1667 days earlier)      last day (3317 days later) » 

psr
12:31 AM
Wanders around deserted whiteboard looking at diagrams.
 
@psr how's Node.JS treating you? Been a while since you started that path, think you made the right decision?
 
12:49 AM
node.js just seems like a bad idea.
 
user55340
 
user55340
> Systems stopped using cooperative multitasking at least 20 years ago because it sucked compared to the alternative of automatic, preemptive multitasking. And yet Node.js harks back to those dark days with its callback-based concurrency, all running in a single thread.
 
user55340
> Smart minds suggested ACID transactions might be a good idea all the way back in the late 1970s. Database schemas were developed as a feature, not a liability, because organizing massive amounts of data is a very complicated task. But this doesn’t seem to bother users of MongoDB one bit.
 
this is not news.
too few have pride in their work, and companies do (almost) everything in their power to reward laziness.
but for now, back to hockeywatching
 
user55340
Software craftsmanship is an approach to software development that emphasizes the coding skills of the software developers themselves. It is a response by software developers to the perceived ills of the mainstream software industry, including the prioritization of financial concerns over developer accountability. Historically, programmers have been encouraged to see themselves as practitioners of the well-defined statistical analysis and mathematical rigor of a scientific approach with computational theory. This has changed to an engineering approach with connotations of precision, predictability...
 
2:06 AM
@Telastyn really? How do you feel about JavaScript in general? I didn't care for it much before learning Haskell, looking at it as an untyped lambda calculus I found it very nice to work with, just sticking to nothing but application and composition, and the control/passing of the whole binding environment is nice
when you avoid anything related to it's "type" system (which is awful) and never use "this", it's very minimal and flexible in that I find
granted continuation passing style sucks, especially when you could just let your runtime automatically async everything for you when it crosses FFI into the OS like Haskell does or .NET's async/await... but CPS is still more obvious to most developers, and the actor model really seems to cause people trouble
 
@durron597 Hi Durron, you might want to check out Spring Boot if you want to stay in Java land
Its literally like everything I ever hoped for in doing small one off web enabled projects in Java
 
I think that it's a language written in a week, and is so slapdash that its creator even hates it. It has some nice bits, but it has just as many bad bits if not more/worse.
 
I was dreaming of this stuff like 8 years ago when I was F'ing around with installing and configuring tomcat and setting up jndi resources and writing build scripts and thinking, most of this stuff is boiler plate
@Telastyn What Java or Spring Boot?
 
If it weren't packaged in Navigator, it would be dead and buried for a decade.
 
Are you talking about Javascript?
 
2:15 AM
And its bad parts I expect are more severe when doing anything but client side scripting.
 
yeah you are talking about Javascript :)
and I totally agree
 
Yes. Jimmy Hoffa asked at 21:06
 
I don't have much personal experience with Spring at all, but it sounds like its own tier of hell.
 
@durron597 Anyway... Spring Boot, use Maven... if you don't know Maven, learn it for your small project, it pays off later... Set your Spring Boot dependencies and it literally will build and package an Uber jar that actually runs as its own embedded web container based on Tomcat
@Telastyn Spring is one of those things that lets you write Java apps VERY quickly and very well as long as you follow the conventional design patterns they recommend and you go all in with Spring. It punishes you for only going half way
 
2:20 AM
Let's you write code in XML I hear
 
@Telastyn Not anymore! :)
They recently introduced the @Configuration annotation
 
Well, that's good?
 
you can create your own classes thats properties declare and instantiate your beans so you dont have to have thousands of lines of XML configuration anymore
plus you get the benefit of intellisense in your IDE with code that you dont get with XML file
 
But still boatloads of runtime errors when you screw it up?
 
guess I'm the only person who thinks anything of JavaScript. It's bad parts are terrible, that's true, but the first class binding environments and simple record types makes it easy to do FP stuff in which I like. The untyped nature allows you to do monadic behaviours more flexibly and concise than any statically typed languages outside of the MLs with their inference I find
 
2:23 AM
@Telastyn Yeah that still sucks with Spring
rooting through stacktraces to find out that you forgot to inject a bean somewhere
 
Perhaps I just like it because lacking good ML inference, the only way to do clean and simple monads is with no typing...
 
"Monadic behaviors" is not something I want. I expect I want it more than most too.
 
@JimmyHoffa I dont understand.. you think JS handles FP stuff well?
 
It does better than a lot of things.
 
Let's say you hash some hidden fields on an HTML form, to prevent tampering with the fields by the user. What prevent the user from using the same hash algorithm that you did (say, MD5) to recreate the hash for their tampered values?
Do you just use a constant salt value? Do you have to rotate the salt from time to time?
 
2:31 AM
Probably? Probably?
 
@RobertHarvey Ewww
 
If you and Javascript love each other so much just go get Node.js and hash your confidential data there
outside the browser
 
0
Q: How Do I Securely Edit a Database Entry Based On ID in an Admin System?

Evan MosseriThis is more of a conceptual question because the way that I am doing it would be secure enough for my purposes (educational). I created a simple admin panel that displays a stock picks database as inputs: {% for pick in picks %} <tr data-post-id="{{i.id}}"> <td class="symbol"><

In ASP.NET MVC, it appears that they encrypt the ID before rendering it on the page, and decrypt it on the way back.
 
@RobertHarvey Oh... you are using this hash as a signature
 
2:35 AM
Yes.
 
Can't you just validate that the data being posted is correct and what it is supposed to be on validation rules?
 
It's supposed to be a number between 1 and int.MaxValue.
It's a Primary Key in some database table.
 
you dont want them to know the primary key
 
Then I guess you encrypt it before rendering it in the page.
 
Thats what I would do. ASP.NET essentially hashes everything in the form in the VIEW STATE
I dont think it is encrypted though, probably just encoded
so not a hash
 
2:39 AM
Yeah, I don't think that's how ASP.NET MVC works. There is no ViewState.
 
missed the MVC part
 
Although I do think you possibly have that mechanism still available to you, should you choose to use it. It'd be a bit of a hack, however.
 
im turning in
gnight
 
2:52 AM
@Telastyn no? I like using the maybe monad for meddling with hierarchical data, I get to just write the code for the happy path and then check the result at the end. try/catch can do similar but those always end up nesting and you don't want to put one in every nested method that deals with your stuff... If I try to update or retrieve something that doesn't exist I just get back Nothing and move on
have used it for that purpose in C# a few times now, seems to work well, makes dealing with CRUD operations on typical data easy
though the code to do it in C# is a mess to write because it lacks the inference so you're expanding huge type signatures everywhere and have to write special case code for each type you're dealing with, which is why I like to have ML's inference or JS' no-typing for those types of things
the API it presents in C# is alright, it's just the implementation that gets messy
 
What a great interview with Steve Lukather from Toto. Their new album is really good.
@JimmyHoffa If you get Nothing back on a CRUD operation, do you know why?
Or do you have to go back and figure out why? Can you return some sort of meaningful error object instead of Nothing?
 
3:54 AM
@maple_shaft I'm afraid you simply generate a single-use UUID, store it in a table where one can use that UUID to look up the concealed primary key, and throw away that UUID (row) as soon as the session is over or it times out. Don't give out encrypted secret when you have an option of not giving out any secret at all. Another issue is the guessability of the UUID. You may need to find one that is harder to guess.
 
4:25 AM
@RobertHarvey I tend to carry an error message around like an Either String a but same behaviour
 
 
7 hours later…
11:43 AM
@JimmyHoffa - how is it a mess? I imagine Possible<T,E> is like 50 lines of code. Add implicit conversions from T,E to Possible and it's not particularly unweildy at the callsite either.
plus, you get actual static analysis, rather than having to write unit tests in javascript (hah!) to make sure you've covered all your bases.
I did that in Java for my class (compiler parsing errors)
even in java it wasn't particularly onerous.
oh yeh, did it in toy language too.
44 lines.
 
11:57 AM
I want to bring back tag cleanups. Starting with , which has some new questions. I'm making a Meta post to ask for tags to be cleaned up, I think.
 
 
4 hours later…
user55340
 
user20683
3:39 PM
@MichaelT that hurts my eyes
 
user55340
/]
[///#/ bottles of beer on the wall,
//$/ bottles of beer
Take one down, pass it around
//%/ bottles of beer on the wall.

/99#99$98%98#98$97%97#97$96%96#96$95%95#95$94%94#94$93%93]
[#93$92%92#92$91%91#91$90%90#90$89%89#89$88%88#88$87%87#87]
[$86%86#86$85%85#85$84%84#84$83%83#83$82%82#82$81%81#81$80]
[%80#80$79%79#79$78%78#78$77%77#77$76%76#76$75%75#75$74%74]
[#74$73%73#73$72%72#72$71%71#71$70%70#70$69%69#69$68%68#68]
[$67%67#67$66%66#66$65%65#65$64%64#64$63%63#63$62%62#62$61]
[%61#61$60%60#60$59%59#59$58%58#58$57%57#57$56%56#56$55%55]
 
user55340
18
A: Shortest Sorted Hello World

Martin Büttner///, 7 lines, 22 bytes / //Hello , Wor l d ! A rare chance for /// to be competitive (well as long as no one starts with Unary and Lenguage...). The code first encounters a /, and parses the / // as a substitution instruction which removes all newlines from the remainder of the program. ...

 
4:25 PM
@Telastyn Here's a quick and easy Either in C# I wrote a while back, it's really not half terrible dotnetfiddle.net/mmmU3H
 
that is... not how I would do it.
but the jist of it is there
 
@Telastyn use dotnetfiddle, I'm curious how you would do something similar in C#?
That's the only way that ever comes to mind for me really, would be interested in other approaches
Whenever I start down the FP path in C# like that I find myself in a mess of type signatures after not too long and it grows irritating because type signatures have a lot of maintenance cost, with inference if you move Name from Person to Account and you change a function to now return Account all it's consumers will happily pick up the new Name location, in C# such things require digging through property not found errors to fix type parameters etc
 
one moment.
 
btw, totally worth creating an account on DotNetFiddle... such a good tool to have on hand for hacking up quick thoughts from any computer
 
4:48 PM
I didn't use the Try in there, but that would likely yield cleaner use.
@JimmyHoffa - though I'm likely missing some nuance that my implementation stomps on
probably needs a helper on match, or something on Possible to passthrough Exceptions.
 
@Telastyn that's a little more extendable than mine, I rely on defaults just going with Left whenever it's not null and forcing it to an Exception, but same jist more or less, you just made the Either type reusable, not tied to the logic of Possible
 
This question seems to seek career advice, which is off-topic here. It does not seem to be on-topic at programmers.stackexchange.com either, so it's not clear whether there is an appropriate site on Stack Exchange. — njuffa 1 min ago
 
and immutable.
 
is a neat way to do it, I'll have to think on that next time I want to do something as such
I think I made mine immutable, no? I typically make stuff like that only settable at construction so each bind constructs a new result
 
5:06 PM
it's not in the link you pasted
 
Actually I don't think you can handle the type parameter changing can you? Can you Try something to go from Either double Exception to Either bool Exception where what you're trying would process your double into a bool?
 
Match processes A|B -> C
you can setup C to make match double|exception -> bool|exception
 
@Telastyn ah yes I see that now
 
 
1 hour later…
6:11 PM
Not anonymous types, and generic constraints aren't a part of the inference in .NET so you can't put an interface constraint on like typeclasses in Haskell and expect it to pick up on it, you have to do specific implementations for each constraint you may want. Anonymous types are just a syntactic sugar, they create a real type, but you can't use them in generic constraints because they aren't named types until the compiler generates the IL
dynamic would deal with such things better to avoid such things, but then you're leaving behind statictyping
 
Ah, right. dynamic.
 
6:42 PM
9
Q: Are names in the C++ Standard Library meant to be in British English or American English?

Andy ProwlAfter a quick search in draft N4296, I could not find any example of a name in the C++ Standard Library for which two possible spellings exists (BrE vs. AmE). While this may even be intentional, I can imagine that at some point, if a graphics library will be standardized (and there seems to be s...

>_<
 
user20683
6:55 PM
@RobertHarvey everything would be easier if Noah Webster had not had a patriotic burr up his ass
 
9:28 PM
everything is fine. The U is an impourtant paurt of Eunglish, and daumn anyboudy who sauys outherwiseu
 
10:00 PM
English colour is better than Enrgish Curor
 
10:55 PM
@Telastyn after writing that, do you still think that type of an API for doing specific things in .NET isn't very nice to have? I like the word Possible for that, the best I ever came up with was one implementation I did I called it Failable, wrote that one so we could compose processing functions with some data requests from a 3rd party webservice that went down a lot
that's the kind of thing I refer to when I mentioned 'monadic behaviour' above, just the API it presents that allows you to string operations together with some decoration occurring between the operations, like error handling, or caching, or what have you
 
not enough to suffer the lack of type safety.
and it's not how I often think of problems.
when I think of decoration (in .NET) it's for behaviors, not to add a token to data
 

« first day (1667 days earlier)      last day (3317 days later) »