What's your stack?



I'm aware of Pony, just never found a good reason to use it over Alchemy.

If the docs don't have massive appeal to you upon reading them, then I guess it isn't for you.

Being able to query like this cuts my development time significantly. Not to mentioned pony often actually brings performance improvements over the other ORMs
 
If the docs don't have massive appeal to you upon reading them, then I guess it isn't for you.

Being able to query like this cuts my development time significantly. Not to mentioned pony often actually brings performance improvements over the other ORMs

Oh believe you me, mattseh has already pitched me on it multiple times. There is no doubt that there is something really good there, I'm just not inclined to pick it up or convert current projects to it. I've looked at the documentation, but I have significant experience with Alchemy, understand the documentation, and prefer that.

I'm not trying to throw it in your face or anything. I'm honestly not even really wanting to learn more new stuff for Python, and I love Python, but I kind of already think of it as old tech. I'm moving towards NodeJS (javascipt in general) and Go.

To those who use WTForms and Jinja, learn Angular, and then give 0 fucks. These days I basically use Flask to handle a RESTfull API, and then use Angular to process all the visual font end stuff. Works way better than writing Flask templates and that kind of nonsense.
 
Mine is
Gentoo Linux - for development
Debian 7 - on my servers/VPS'
Centos - on virtual machine, for testing some stuff for compatibility

Intellij PyCharm + erlang plugin - IDE

mercurial - for my own repos
git - for public repos from github



Python (BeautifulSoup for scarping, Django for web)
Erlang (Cowboy and ChicagoBoss for web)
JQuery - client-side scripting
Postgres, Mysql, Mnesia - databases

nginx - web-server
 
Preferred list:

- OS X
- Sublime Text 2
- ZSH/Oh My ZSH (iTerm2)
- Git (SourceTree)
- Postgres

- Python 2.7
- Django

- Bootstrap 3
- Bower
- Grunt
- Sass

- Nginx
- Gunicorn/Waitress

To those who use WTForms and Jinja, learn Angular, and then give 0 fucks. These days I basically use Flask to handle a RESTfull API, and then use Angular to process all the visual font end stuff. Works way better than writing Flask templates and that kind of nonsense.

I've been thinking along similar lines lately but I don't have much desire to learn JavaScript.

I've done a fair amount of the basics with jQuery in the past but don't have a lot of general JavaScript experience.

Do you have any recommendations about how to fill the knowledge gap in order to get up to speed with Angular? (Definitely only interested in JavaScript on the client side)
 
Rage9, are you writing angular stuff "by hand"? By that I mean that I often autogenerate form HTML from a WTForms class, which I can often autogenerate from a model (most forms aren't doing much special). Is it possible to autogenerate the angular code for these cases?
 
I must be blind, but I really don't see the value adds for most of this stuff. Have to look into Angular a bit more, as that one does look like it could be beneficial. The rest seem like going the long route to get the same job done, and/or getting the same job done in a much more inefficient manner.
 
I must be blind, but I really don't see the value adds for most of this stuff. Have to look into Angular a bit more, as that one does look like it could be beneficial. The rest seem like going the long route to get the same job done, and/or getting the same job done in a much more inefficient manner.

What are you referring to? Most of the things linked make development very efficient.
 
What are you referring to? Most of the things linked make development very efficient.

For example, take Pony. For one, aggregrate database functions have been standard in SQL probably well before any of us were born, so that's nothing special. Then for example, on their home page they give an example foreach loop, and the corresponding SQL statement that gets generated:

SELECT "c"."id"
FROM "Customer" "c"
LEFT JOIN "Order" "order-1"
ON "c"."id" = "order-1"."customer"
GROUP BY "c"."id"
HAVING coalesce(SUM("order-1"."total_price"), 0) > 1000
What kind of convulated mess is that? I don't know, but I don't want my software running statements like that against the database. Here, in basic SQL:

SELECT c.id FROM Customer AS c, Order as o WHERE c.id = o.customer AND o.total_price > 1000;
Isn't that cleaner and simpler? Another example is WTForms mentioned in this thread. For one, it's getting very close to that line where you're including template code in the source code, and that's a big no-no -- development 101. Aside from that, I just don't see the value add. That honestly seems like a lot of work for a simple HTML form.

I do agree most HTML forms are pretty much the same though, and can be simplified on the development end. I actually stole a page from Facebook for this, as I think their implemention is excellent. I can now put the following into any template:

Code:
[form_table action="/admin/account/whatever"]
   [text name="username" required="1" jsValidate="checkUsername(this);"]
   [password name="password" required="1"]
   [text name="email" label="E-Mail Address" required="1" format="email"]

   [separator]

   [select name="category" required="1" data_source="table(account_categories)"]
   [boolean name="add_api" label="Add via API?" value="1"]
   [textarea name="description" size="500x200"]
   [submit]
[/form_table]
Put that into any template, and the template engine will turn it into a nice two column table with all necessary labels and fields, Javascript validation, etc. Plus it's still keeping the design and code aspects of the project separate.

Again, I don't know what the raving is about all this stuff you guys are using. Maybe I'm blind, but many times I just don't see the value add. Again, I still need to check out Angular a bit more though, as that does look promising.
 
Lately mostly PHP (Laravel for a restful backend API + Eloquent ORM or just use Fluent where performance is an issue), AngularJS (front end), Bootstrap or Foundation depending on a project (though I rarely use these tbh), mysql, nginx.

Started learning Python (also used Django/Flask for a bit) but quickly switched back to PHP when Laravel 4 came out.

Nothing fancy. Allows me to get things done fast so w/e.

I also use all kinds of random services like iron.io, trak.io, pusher.com and so on. There's loads of them that can be useful depending on the project.
 
@Kiopa_Matt: I guess it's that time of year again.

First of all, I haven't used SQL in a long time, but I don't think your query does the same thing. I'm pretty sure the Pony example is returning customers that have spent a total of over 1,000 across their orders. Your query returns customers that have any order where total_price is over 1,000.

Second of all, by writing SQL by hand, you're either moving your queries out of the app layer (which some people like) or you're managing raw strings in your app layer which has its own nonrobust pitfalls that you might not care about. The second you abstract away query strings in the app layer, then you've just recreated one of the main reasons people like ORMs: SQL generation. If you don't think the indirection is worthwhile, that's okay. Nobody here is going to be bothered.

The bottom line is that it's just combative and arrogant to assume that nobody else but you is deliberate in the tools we use.

Tooling is all about preference and our unique personal experiences. Yet every year you feel the need to let us know how much better you like your preferences. We get it.

Anyways, see yall in What's Your Stack 2015. u 2, Kiopa_Matt, u lil rapscallion.
 
For example, take Pony. For one, aggregrate database functions have been standard in SQL probably well before any of us were born, so that's nothing special. Then for example, on their home page they give an example foreach loop, and the corresponding SQL statement that gets generated:

SELECT "c"."id"
FROM "Customer" "c"
LEFT JOIN "Order" "order-1"
ON "c"."id" = "order-1"."customer"
GROUP BY "c"."id"
HAVING coalesce(SUM("order-1"."total_price"), 0) > 1000

What kind of convulated mess is that? I don't know, but I don't want my software running statements like that against the database. Here, in basic SQL:
SELECT c.id FROM Customer AS c, Order as o WHERE c.id = o.customer AND o.total_price > 1000;
Isn't that cleaner and simpler?

1. You missed a GROUP BY. Let us add that:
SELECT c.id FROM Customer AS c, Order as o WHERE c.id = o.customer AND o.total_price > 1000 GROUP BY c.id;

2. Here is the original Python generator from Pony's home page:
select(c for c in Customer
if sum(c.orders.price) > 1000)

Oh! We missed a sum(). We have an aggregate function and so, to filter that, the simple where clause is not enough. We have to use HAVING. Replacing:

SELECT c.id FROM Customer AS c, Order as o WHERE c.id = o.customer GROUP BY c.id HAVING SUM(o.price) > 1000

3. The comma join is supposed to represent a cross join, but it is ambiguous and works different depending on your database (e.g.: mySQL treats it as a cross join, and in mySQL, inner join is equivalent to a cross join!). Also, for our purpose, we need an outer join, since we want a list of all customers, whether there are any columns on the right side or not.

So, next step would be to replace the comma join with an explicit join. This will also involve using a key. So, the comparison of ids in the WHERE clause will become the key comparison for ON.

Our query now looks like this:
SELECT c.id FROM Customer AS c LEFT JOIN Order as o ON c.id = o.customer GROUP BY c.id HAVING SUM(o.price) > 1000

4. To avoid special characters and spaces messing with our syntax, we need to add quotes around the names. Adding the quotes, the query now looks like this:

SELECT "c"."id"
FROM "Customer" AS "c"
LEFT JOIN "Order" AS "o"
ON "c"."id" = "o"."customer"
GROUP BY "c"."id"
HAVING SUM("o"."price") > 1000

5. o,price may have null values. So, the comparison may not work in all cases (Instead of 1000, what if it is 0?) because of NULL comparison rules. To take care of this, let us add COALESCE function, which returns the first non-null value from the list of values given to it.

SELECT "c"."id"
FROM "Customer" AS "c"
LEFT JOIN "Order" AS "o"
ON "c"."id" = "o"."customer"
GROUP BY "c"."id"
HAVING coalesce(SUM("o"."price"), 0) > 1000

6. ORMs make decisions to create aliases so as to account for multiple uses. If you want to do two comparisons, having aliases like "order-1", order-2", etc will help. This is a minor change, let us do that.

SELECT "c"."id"
FROM "Customer" AS "c"
LEFT JOIN "Order" AS "order-1"
ON "c"."id" = "order-1"."customer"
GROUP BY "c"."id"
HAVING coalesce(SUM("order-1"."price"), 0) > 1000

7. "AS" is redundant, so we can take that out.

SELECT "c"."id"
FROM "Customer" "c"
LEFT JOIN "Order" "order-1"
ON "c"."id" = "order-1"."customer"
GROUP BY "c"."id"
HAVING coalesce(SUM("order-1"."price"), 0) > 1000

8. Behold the result, which is the same as the one on Pony's home page!

9. Advanced: Look at the query again, very carefully. And then, look at the query on their home page. Wow - they have a typo! Instead of
HAVING coalesce(SUM("order-1"."price"), 0) > 1000
they have
HAVING coalesce(SUM("order-1"."total_price"), 0) > 1000

Should we trust a company which has a typo like this on their home page, that too as part of their primary example? Discuss.

il1jaw.gif
 
Why no Vagrant?

I see it has its uses, but I have never needed it. I'm yet to run my shit on OS X (where I develop), and then it not run when I push it to my ubuntu servers.

If I was working on something where I couldn't install the necessary lib on OS X, then I'd developer in Vagrant. Or if I started noticing things acting differently between my dev and servers, but as of now - I've never hit that issue.
 
Kiopa's WTForms discussion is hilarious - "For one, it's getting very close to that line where you're including template code in the source code, and that's a big no-no -- development 101." - It's conceptually the same as having models referenced in a template or view.