Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

11-20-2014 , 11:23 AM
Quote:
Originally Posted by gaming_mouse
if good prose is writing that's natural and easy for people to read, why does it take so long to master the craft? what's natural and easy to consume is not necessarily natural to produce.
Just to remind you, your entire argument earlier was that AngularJS had a steep learning curve and Mithril has almost no learning curve.


Quote:
what it offers me is the ability to do design my application exactly how i want, and leverage all the work i've done learning about good design.
I think it's quite possible that you're going in the wrong direction. Good software design comes from understanding the application domain, understanding the ways in which the application is likely to evolve, lots of experience and some genius. It certainly doesn't come from reading and watching videos about software architectures and DCI and frameworks in the abstract, which is where I'm afraid how you came to these ideas.


Quote:
this to me is evidence of its inferiority, if anything.
This to me is your central problem here - you're skeptical of anything that is popular. But popularity is correlated with usefulness. Other people aren't complete bumbling idiots. When technology A is better than technology B for most actual uses, all else equal, A will become more popular or at least as popular. Whent it isn't, there usually are clear barriers to adoption or you're not thinking about usefulness in a way that matters.

For example, there was a time in the 80's and 90's when people Lisp advocates were making a big fuss about how everyone should use Lisp instead of C/C++ for most applications. In some small ways, they were right. But the problem was, well, C and C++ were clearly better suited for writing system software like operating systems, major system libraries and the core of complex shrink-wrap software that competed on speed, responsiveness and memory usage because computers back then were quite underpowered. Since these were the hardest technical problems in the industry, they set the tone for how companies hired and how candidates evaluated technologies. And most other applications were more about gluing together these components through C/C++ API. I suppose you could use Lisp for that, but why bother if most of your code had to interface with C/C++? By the time Common Lisp was legitimately a good option for a wider variety of software and the web made it easier for other language ecosystems to thrive, languages like Perl and Java became good enough at the features of Lisp that people really needed.

And everyone's first reaction to AngularJS is, wtf terminologies, wtf documentation and dude, where's my javascript. It had completely impenetrable documentation, an unattractive website and zero evangelism on the part of its sponsor. Why and how did it become popular?


Quote:
by this argument, we should all be building websites in wordpress, drupal and joomla.
You absolutely should if you can! Writing web applications in a lower-level framework when a generic CMS would suffice is definitely a major anti-pattern.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 11:45 AM
How to Hire an Elite Programmer:

1) "We believe pushing the envelope is an anti-pattern. We build the minimum that will suffice, preferably in Wordpress."

2) "The principles of Good Software Design will be decided by our business team. Studying software architectures and abstract concepts is a waste of time."

3) "We're committed to ASP.NET MVC and Angular."

Where do I sign up?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 12:12 PM
To be fair I'm personally attracted by #1.

I'd much rather push the envelope in the sense of accomplishing a business goal (which is often through technical innovation) then pushing the envelope just to push the envelope.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 12:26 PM
Quote:
Originally Posted by gaming_mouse
but angular, like rails, encourages putting business logic in its controllers, coupling it to the framework.
It does the exact opposite. You can't reuse any logic you put in controllers, so ou can't put reusable business logic there even if you wanted to. AngularJS Services are the only things that you can reuse from multiple places, so over time all core business logic and core business objects gravitate towards services even without trying. Logic put in AngularJS controllers is also easier to extract into services than logic put into controllers in frameworks where controllers drive views.

The problem with Rails (and Ember.js) isn't that it encourages fat controllers per se, but more that even its models are tied to the framework. This is absolutely not true of AngularJS and this isn't something Mithril improves from AngularJS.

I'm fairly skeptical about this being useful for business-logic heavy applications. This seems to encourage event-driven, imperative business logic scattered around the application. I think it's quite possible that two-way binding doesn't work all that well with a very large team for a UI-heavy consumer application that needs to be extremely responsive, because at the extremes, it can be difficult to reason about latency, the same way that Java and Common Lisp were inappropriate choices for that in the 90's because it's difficult to reason about latency with GC.

Quote:
a store registers itself with the dispatcher and provides it with a callback. This callback receives the action's data payload as a parameter. The payload contains a type attribute, identifying the action's type. Within the store's registered callback, a switch statement based on the action's type is used to interpret the payload and to provide the proper hooks into the store's internal methods.
This seems like a model that's bound to the framework.

The nice thing about AngularJS is that for light-weight "model" that's not really core business logic, but application state that's specific to the view or otherwise not core to the domain model, it can just live in the controller/scope without polluting the core domain model. Also the magic of two-way binding is that you're almost always thinking declaratively - you're asserting equivalence without writing logic that controls it.

But either way, I think you're reading this all completely backwards - it looks like AngularJS is ideal for domain-logic heavy applications because it frees you up from thinking about how the data flows, at the expense of causing minor performance issues when you have extremely complex views worked on by lots of people. where as React/Flux is more optimal for domain-logic light applications where views are central to application logic and the exact process by which the view is updated needs to be controlled for performance needs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 01:16 PM
Quote:
Originally Posted by cookies4u
hey guys, sorry for the tl;dr, hoping for some advice.

so i'm a sophomore in college, recently took up programming as a hobby but i've been getting more and more into it. i'm a history major (don't judge...), and switching to CS would likely add a full extra year to my estimated graduation date, and since at 23 i'm already kinda old for a college student (will be 25 when i graduate), i don't want to delay things any further.

the solution i had in mind for this is to get a BGS (general studies degree, you're not allowed to pick a major or minor), which basically means taking whatever classes i want within a few guidelines. and it wouldn't delay graduation time, since all my current credits would still apply to the degree. my plan is to do this and take mostly CS classes to learn as much as possible.

just looking for some feedback from people who work in the industry. i assume my BGS will look as relevant as basket-weaving to prospective employers, but then again history doesn't seem like it would be much different? based on googling and browsing these forums, i see a lot of comments saying that CS degrees generally don't mean much, Github is a programmer's resume, etc...but there seems to be some disagreement on this issue. will i get automatically filtered out by the HR dept. at bigger companies?
thanks for answers on this from gamingmouse, katokrazy, barrin, metetrown, iosys. i kind of forgot to keep tabs on the thread, but i talked with one of the CS professors here and this week i decided i am going to stick it out for the CS major, first semester will begin in January.

Quote:
Originally Posted by TheMetetrown
You know you don't have to intern where you live? Good internships will pay for your relocation/housing for the summer.
i actually did not know this, lol. is it possible to get "good internships" coming from a no-name school without being a wizard? in case it wasn't implied explicitly enough i slacked pretty hardcore during my noncareer as a history major. besides trying to get as good at programming as i can, is there anything i could be doing to help my case?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 01:55 PM
candy,

i don't want you to think i'm passive-aggressively ignoring your last post, but i'm not going to respond to it because we can probably both agree this has gone on long enough i respect your opinion and think you're one of the best posters here but i disagree with you fundamentally about this and i doubt we could bridge the gap, certainly not by more abstract theoretical arguments. so we'll have to agree to disagree.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 03:20 PM
Quote:
Originally Posted by jjshabado
To be fair I'm personally attracted by #1.

I'd much rather push the envelope in the sense of accomplishing a business goal (which is often through technical innovation) then pushing the envelope just to push the envelope.
This. MapReduce (originally implemented in good ol' C++) is innovation. Cassandra (implemented in good ol' Java) is innovation. Creating a complex code base for what can be easily accomplished in Wordpress with a couple of plugins is not innovation - it's just inefficiency. Sometimes it's fun to transform normal boring business-logic code into continuation-passing style for ****s and giggles but you shouldn't confuse that with real innovation.

What's important is creating something amazing. Trying to feel superior to others with your fringe technology choices and obsessing over minor details that ultimately have nothing to do with long-term objectives is just technology hipsterism.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 03:22 PM
Quote:
Originally Posted by gaming_mouse
i don't want you to think i'm passive-aggressively ignoring your last post, but i'm not going to respond to it because we can probably both agree this has gone on long enough i respect your opinion and think you're one of the best posters here but i disagree with you fundamentally about this and i doubt we could bridge the gap, certainly not by more abstract theoretical arguments. so we'll have to agree to disagree.
No worries dude and thanks You're probably right it's not super-productive because we don't have a ton of experience in the other framework. I just wanted to correct what I thought was overt contrarianism, which seems common on technology forums.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 03:38 PM
Btw, anyone have experience with Azure? Or preferably both Azure and AWS? I'm curious what people thought about the experience.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 04:02 PM
I only have 2nd hand stories of Azure - but they weren't good. I was also told that internally Microsoft doesn't even use Azure - they have a separate version of it that people like better.

Edit: Although to be fair I believe Amazon was the same way with AWS originally and that it took a long to move people to it (and it may still be an on going process).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 06:15 PM
Sweet, learning about P vs. NP in Theory of Algorithms. Been waiting all of my schooling for this!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-20-2014 , 07:11 PM
LOL, our professor gave the best explanation of transitivity ever today.

Nothing is better than sex.
A sandwich is better than nothing.
--> A sandwich is better than sex.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 08:11 AM
Quote:
Originally Posted by gaming_mouse
I'm the CTO of a startup with a small tech team. Some projects I work alone, some I collobarate with others on. I have the freedom to choose the tools I use. I also have side projects, although not a lot of time for those.

To be clear, angular is not "insufficient" to meet my needs. Anything I do could be done in angular. It would be fine. But given the choice, I'd rather use react or mithril. If you want to use angular, more to power to you. In your original post, you expressed frustration with the learning curve. I was giving you my opinion that your frustration was justified and offering you alternatives. If the alternatives seem even more frustrating to you, or you don't see what benefits they might have, you should ignore my advice and power through with angular. The benefit I personally get depends on my own understanding of how to do design. Your background is different, so you may not get the same benefits. Another example of the curse of knowledge, I guess.

Anyway I think this argument has run its course. I can't add much more than I already have.


Your argument with candybar has been very useful. I agreed with him on pretty much everything (my experience reading the thread was pretty much furrowed brow on your posts, nodding along on his) but that's OK. Hope I didn't come over too abrasive, I tend to express my opinions pretty strongly but there's every chance everything you're saying is right and I'm not getting it because I don't have enough experience. That's happened to me more than once.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 08:16 AM
I wonder sometimes whether we all have pretty different needs for being able to understand code quickly. That "thinking in React" link you posted earlier (http://facebook.github.io/react/blog...-in-react.html) finished up with this:

Quote:
While it may be a little more typing than you're used to, remember that code is read far more than it's written, and it's extremely easy to read this modular, explicit code.
I was all (°_o) because the code in the article isn't particularly readable to me. For instance:

Code:
        this.props.products.forEach(function(product) {
            if (product.name.indexOf(this.props.filterText) === -1 || (!product.stocked && this.props.inStockOnly)) {
                return;
            }
            if (product.category !== lastCategory) {
                rows.push(<ProductCategoryRow category={product.category} key={product.category} />);
            }
            rows.push(<ProductRow product={product} key={product.name} />);
            lastCategory = product.category;
        }.bind(this));
To be clear, this isn't like totally baffling to me or anything, I can obviously read along and follow it. but being all "I know it's more typing, but look how amazingly readable the result is!" is just weird to me. That implies that I should know at a glance what is going on.

What I seek in reading code above all is semantic clarity. I could care less about syntax. You want to put everything in Polish notation, fine by me. But say you make an app that deals with the 2+2 forums and you make a class "Post" that actually encapsulates threads, not posts, you have just ruined my productivity and made me homicidal in the process. I find it impossible to think about things if I'm not dealing with well-defined and clearly named concepts.

Last edited by ChrisV; 11-21-2014 at 08:22 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 08:20 AM
btw is there any way to widen that [ code ] block to avoid the horizontal scroll? It's pretty annoying because it doesn't seem necessary.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 09:37 AM
Hey Chris,

It's cool that you're researching the options yourself with an open mind. Best of luck whatever you decide.

To answer your question about the code snippet above, my first comment is that I agree with you. If it were mine, I'd rewrite it for clarity, probably pulling out some functions so that the piece you quote could be simplified to something like:

Code:
this.props.products.forEach(function(product) {

    if (isFilteredOut(product) || notAvailable(product)) return;

    if (product.category !== lastCategory)
        rows.push(<ProductCategoryRow category={product.category} key={product.category} />);
    
    rows.push(<ProductRow product={product} key={product.name} />);
    lastCategory = product.category;

}.bind(this));
Even that's not great, because I'm not crazy about the lastCategory / currentCategory check thing going on. It feels procedural and clunky.

And on top of all that, you have the ugly JSX xml-y stuff going on. So at this point, you might be wondering why I would still be recommending this stuff...

To borrow an analogy from writing, think overall structure vs sentence level elegance. An essay could be well-structured and easy to follow, with clear arguments backed by orderly evidence, but nonetheless poorly written at the sentence level: too wordy, overly academic, etc. Conversely, a brilliant writer can produce something meandering, with no clear point and arguments without evidence, but gorgeous and entertaining at the sentence level.

I'd argue that the code in question is poor at the sentence level. And when Pete is making his claims about this code being easy to follow, he's talking about the system level.

The behavior of the system as a whole is incredibly simple. You have a data model. Events change the model. The view is guaranteed to reflect the model, and updates itself automatically. That's kind of all you have to know to understand a system built in this way. Everything else is details. And I'm willing to put up with ugliness and verbosity in those details to get the system level simplicity. Because complex system architecture is the real time sink. That's where you find the nastiest bugs.

I think I linked to this before, but for a specific example of the benefits of this approach watch the 15 minutes or so of this video, which starts around 10:15: http://facebook.github.io/flux/docs/overview.html. She walks through refactoring a facebook feature from a more complex version of MVC into this style.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 11:07 AM
Is there any way to generate DAO and model in Java from SQL tables?

I found this library and I think it's gonna simplify things for me: https://github.com/nurkiewicz/spring...dbc-repository

But I find it painful that I have to create same model twice, when I already have it set in PostgreSQL.

I think I'am going to create a code generator that does Spring Config, Model and Dao from SQL definitions of tables.

Just think that this part of software development is a huuuge leak.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 12:18 PM
Quote:
Originally Posted by bex989
Is there any way to generate DAO and model in Java from SQL tables?

I found this library and I think it's gonna simplify things for me: https://github.com/nurkiewicz/spring...dbc-repository

But I find it painful that I have to create same model twice, when I already have it set in PostgreSQL.

I think I'am going to create a code generator that does Spring Config, Model and Dao from SQL definitions of tables.

Just think that this part of software development is a huuuge leak.
What youre mostly talking about here is an object-relational mapper (ORM). The biggest and most established ORM in the Java universe is Hibernate.

How many layers of abstraction you put between that and whatever your users are accessing depends on the specifics of the project. Many people will advocate using the ORM purely for persistence, with a separate layer of objects defined for domain logic and yet another layer for presentation. This achieves the cleanest separation of concerns and is what you should do if the persistence layer is subject to alteration (for instance, will you ever want to use cloud storage instead of a local database?)

If you are pretty sure the persistence method is unlikely to move away from your ORM, then abstracting away the ORM from your domain logic is an example of the antipattern called abstraction inversion. You are forgoing powerful features of the ORM for no gain. So its a tradeoff and you have to make a judgement call.

To automatically map objects across seams, the .NET world has a thing called AutoMapper. Im on phone, but Googling AutoMapper for Java should get you somewhere.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 12:37 PM
I actually used Hibernate, but it still seems like I would be spending time writing boilerplate code.

Lately I've been very inspired by R, this is how retrieving all results out of a table looks like:
Code:
library(dplyr)
con <- src_postgres(dbname='dbname',host='host',port=port,user='user',password='pass')
tableResults <- tbl(con, 'tableName')
tableResults will be an associative array, columns will have same names and types as they do in the db and rows will hold values.
So it's three lines of code to manage the dependency, db driver and to get the result set.

For my current project I need to transform data that is in various format (csv, xml, json, pdf, xls,...) but the model is same, and I figure to merge it into DB and analyze it.

So I guess it got me thinking of the long run and writing a script that could help speed up the process.

Seems like Spring Roo could do the trick, and is there some functional language under JVM that does it like R?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 01:36 PM
Quote:
Originally Posted by bex989
I actually used Hibernate, but it still seems like I would be spending time writing boilerplate code.
You already said you were writing Java.

Spoiler:
Hey-Oh!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 05:10 PM
Quote:
Originally Posted by bex989
For my current project I need to transform data that is in various format (csv, xml, json, pdf, xls,...) but the model is same, and I figure to merge it into DB and analyze it.
I wouldn't be using an ORM for that, because you'd just be transforming the data from tabular form into object form and then back into tabular form.

IDK how to do it in the Java world. In the .NET world I'd use pure ADO.NET. DataSets and DataAdapters and the like. Taking it back to the old school.

You could always come join me in C# land. It's open source now and being ported to run on other OSs. Also, having used MSSQL, MySQL and Postgres, I'd opt for either of the other two over postgres.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 05:59 PM
@dave since you're "the DB guy". Have you ever used sqitch?
https://github.com/theory/sqitch

Was on the FLOSS-Weekly podcast I listened to on my way to work today. Sounds pretty neat.

Quote:
Originally Posted by iosys
I would like to see actual proof on photo being good or bad.
Everyone is really just pulling things out of their ass.
In the US I'd use a photo 0% of the time. In Europe I have a photo on my resume because I think it makes your CV look more human and less like a piece of paper. I read some cliffnotes on it back in the day but never updated by knowledge so any link to studies on this would be welcome.
Usually I go with a standard somewhat conservative business picture but for a pure tech job I might consider casual if I know for sure they don't have dedicated HR people.

Last edited by clowntable; 11-21-2014 at 06:10 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 06:09 PM
Quote:
Originally Posted by ChrisV
I wouldn't be using an ORM for that, because you'd just be transforming the data from tabular form into object form and then back into tabular form.

IDK how to do it in the Java world. In the .NET world I'd use pure ADO.NET. DataSets and DataAdapters and the like. Taking it back to the old school.

You could always come join me in C# land. It's open source now and being ported to run on other OSs. Also, having used MSSQL, MySQL and Postgres, I'd opt for either of the other two over postgres.
I have some experience with C#, I especially liked LINQ with implicit type, and the compiler seems to be very smart. In Java you can do most of it as well but there are spots where you need to declare types. And implicit values are supposed to be released in Java 9 I think.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 06:23 PM
Quote:
Originally Posted by e i pi
Anyone here know haskell? Any thoughts on it's usefulness &or difficulty?

I would really be better served by learning more practical things but I can't help but be drawn to mathy/academic subjects.
It looks interesting but I fell like I'm too dumb for it. "Understand monads" has been in my Trello projects/ideas/misc list for ~2 years now.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
11-21-2014 , 06:32 PM
Quote:
Originally Posted by catsec
I'm trying to sure up some python3 basics I'm unclear on, and I have a couple questions.

First of all, is this (lines 1 and 2) a method, or a function?
I think you might have your terms mixed up a bit. "Stuff that doesn't return anything" is often called a procedure but that naming is becoming less comon these days. People mostly call these constructs functions.

A method is a function that is associated to an object/class (AFAIK) so in Python I guess you'd call anything that has "self" as the first paramter a method.

So basically I'd say in Python you use the term function unless it's associated to an object/class in which case you call it a method.

[that's the easy answer but stuff is more nuanced]

Quote:
Originally Posted by candybar
Yeah, some hedge funds use it, but as far as I can tell, it's not so much they care specifiically for haskell or need haskell to do what they do but more that hedge funds like to hire ultra-smart
Probably a mixture of that and the fact that I'd guess formally proving code might be a thing in finance (due to compliance reasons or something) and a language like Haskell probably makes that easier.
I'm also suspecting it might be a myth kept alive by Haskell programmers
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m