katernya / seattle12step

1 stars 0 forks source link

Don't do it #1

Closed thyla closed 12 years ago

thyla commented 12 years ago

please, for the love of god and all that is holy do not use perl to make web apps.... or do at least you're finally working on ... something ..... legit.

***Protip: in PHP it's as simple as json_decode($jsondataasstring, bool true/false on whether or not to return an object or strictly an array.)

-and -

json_encode($arrayorobject) <-- returns a JSON string which can easily be deserialzed in one simple javascript call, or is autoamtically done for you in JQuery.

JQgrid, JQueryUI, read about how to do a jquery.ajax() request. it will call a URL, all you need to make sure of is that your response is application text/json or whatever response is appropriate. It doesn't have the best marshaling but its as simple as new ajax({ callback: function functionToCallWhenResponseComesBack() {}, error: functionToCallOnHTTPErrorStatusCodeReturn(), request_uri: "http://seattleaa.org/scriptthatgivesajsonresponse?var=foo", request_type: "GET" ............

MongoDB -- requests and responses between this NoSQL document / database server are in the form of JSON!!!! it uses BSON as it's storage engine, its very simple, you store by giving it a huge serialized javascript object (JSON), and you can search for various properties on that JSON object using REST calls or API wrappers around those rest calls:

http://api.mongodb.org/python/current/tutorial.html

Python has it down to a system. You should definitely look into the map reduce shit that you can do with it, here's a real world ruby example of map reduce (it's very buzz and hard to come by something that's useful):

master_ips = search(:node, "role:Lamp_Master").map {|n| n["network"]["interfaces"]["eth1"]["addresses"].select { |address, data| data["family"] == "inet" }[0][0]}.join(",") =>> returns a list/hash map of IP's [192.168.1.5, 168.2.3]

^---- chef/ruby cookbook example, the concept is the same as it would be in python

Ruby Python ..... perl.. meh perl you're like my friend Webster he insists on using perl because he likes esoteric language constructs where operators can mean different things depending on the scope... which is great except when you're have to read someone elses perl code. Ruby is much the same

thats about, try out some new shit don't be afraid to you obviously have time.. it'l pay off

cool shit:

stuff that I work with:

more stuff that I have worked with recently thats worthwhile / semi worthwhile

I'm starting to love pure javascript DOM without any frameworks except those developed by our shop.

Keep up the good work doll, I'm glad to see you taking a stab at something I can understand.

katernya commented 12 years ago

fuck ruby, fuck you