## zscdragon one year ago A question for the developer of this website: in which programming language are this site's core functionalities made? (except of course html, css)

1. JA1

HTML/CSS are all client side, ao are you asking for the server side or client side?

2. JA1

so*

3. JA1

Anyways "core" I would guess means the server side, and so the server is made in Scala (Primary) MongoDB, and a couple more, back me up on this @thomaster I kinda forgot xD

4. zscdragon

The reason I'm asking this is that my school wants to implement something like openstudy for teacher-students aid or student-student mutual aid. Since openstudy has been around for quite a while, what's the best solution to handle server side management with today's technology?

5. JA1

I don't really get what you mean? What exactly are you trying to accomplish?

6. zscdragon

to make a website similar to openstudy (real time question + answer without refreshing page, level system, chat system)

7. JA1

You want it with all the bells and whistles or just the basic core functionality?

8. thomaster

He just said only the questions and answering :P no smartscore or chat stuff

9. JA1

He said level system thom..... :P

10. thomaster

smartscore = a level system :)

11. zscdragon

yea pretty much those 3 :P

12. zscdragon

but the real time interactive questoin + answer is the most important, that should be done above all :)

13. zscdragon

i'm somewhat experienced in programming, know javascript, mysql and python, but guess that's not enough?

14. JA1

Ok so you really don't have to go the same way OS went, if it makes it any easier your school could introduce a new system made out of something more manageable (another language) and they could build a new one that is a lot simpler

15. JA1

That's pretty close to enough

16. JA1

17. zscdragon

which programming language would u guys suggest that does the best job? people say javascript is insecure and php is dislike by lots of people (i dunno why tho)

18. zscdragon

ok thanks :)

19. thomaster

20. JA1

Javascript, html, css, ajax, etc.. all these langauges are mainly Client Side, what you want is server side, for server you can use Python, Scala, CGI/PERL, ASP, DJango (frame for python) Cold Fusion, JAVA (arguably the most robust and powerful platform for server side, Other than that you can look around for others, but you might want to speak with the school IT about all this and see what he likes the best.

21. JA1

Oh and ASP is just a framework

22. dumbsearch2

OpenStudy used Scala (very similar to Java) for all it's server-sided stuff. They used the typical languages, JavaScript, HTML and CSS. Note that for a lot of the answering and posting stuff, it was done with the server, and linked together heavily utilizing AJAX.

23. JA1

Oh and ruby is also a good one

24. JA1

Honestly the list goes on forever, you need to find a language that suits your needs and your IT's needs

25. JA1

Everything else is minimal.

26. dumbsearch2

And the main reason why PHP is disliked is for only one reason: It is not that efficient. It is still used quite a bit, because it is quite easy to learn. Facebook finds a solution by being programmed in PHP, yet being compiled to C++.

27. dumbsearch2

And the way that you can answer and ask questions uses the server language, it connects to the server... and the Ajax allows the data to be dynamically loaded without any page refresh. Note that I'd prefer Sockets in this case, though for a small website this could be heavy handed. And PHP could still suit your needs quite well. It only gets slow for really big sites.

28. JA1

Don't you have a a very basic and stripped down version of OS for emergencies? Maybe you could help him get something like that for his school.

29. dumbsearch2

Hmm. I made it in PHP.

30. JA1

Well something like that would be good for him, hos school want's a basic functioning website so that's good, and it could also be more like an intranet, you know like only local to the school so they can house the servers there, although I would like to ask, what school is it? I need to know so I can see what type of system they have, I know for my county it's all tied together with the counties servers.Like this http://www.polk-fl.net/

31. JA1

The county manages everything, if they go down all of Polk county schools interent goes down, that's how it works in florida, the county is the manager.

32. zscdragon

it's a private highschool in montreal, Canada, Brebeuf College. So school manages it itself :)

I put up some details of the technology OpenStudy uses at http://openstudy.com/updates/4f41c098e4b0803c6353192f a while back.

34. JA1

I knew shadowfiend would listen to the cry of distress ^,^

35. dumbsearch2

Haha Yes, OpenStudy also uses the Lift framework.

PHP's downside is generally not considered to be its speed, though that can contribute. It's considered to be a somewhat convoluted language that implements certain language features that make it more difficult to reason about the program in a safe way, and more difficult to create maintainable programs.

37. JA1

I was actually toying around the source files right when this came up xD

38. dumbsearch2

@shadowfiend Efficiency is a large factor I've heard. Languages like Node.js can handle stuff a lot faster

You could make something similar using Python and the Twisted framework. There are probably better abstractions layered on it at this point. Personally, I don't think there's anything out there that really holds a candle to Lift for real-time application development at the moment. The concepts that Lift uses to express real-time applications (actors in general and comet actors in particular), once you understand them, are extremely powerful and extremely simple to reason about.

Efficiency and scalability are words that get thrown around a lot without most people really understanding what they mean. At the scale that @zscdragon is talking about, the difference would likely be negligible.

Lift's concepts as opposed to Node, which is still mostly either a mishmash of callbacks or abstraction layers that hide so much from you that you don't really know for sure when you start losing messages and such.

42. JA1

What about Python with DJango framework? I have seen some rather astonishing applications.

I've seen some solid apps with Django, but I don't know that there's any built-in support for real-time applications.

44. JA1

That website I sent you is all DJango with Python on server, I have seen it myself.

45. JA1

Here is the source, https://github.com/reverie/yourworldoftext

46. dumbsearch2

@shadowfiend One thing I know is that this site is extremely slow. It's over-reliant on AJAX or similar technologies. Have you tried switching this site to some socket.io based technologies?

A valuable lesson to learn is to never assume you know the reason something is slow.

Until you actually get in the code. 90% of the time, you're wrong.

AJAX has nothing to do with slowness on OpenStudy, congestion has everything to do with it.

And all of that happens in the backend.

51. JA1

That's actually very much true, you can't assume

Sockets have little serious benefit over long-poll comet requests.

53. dumbsearch2

I can show you all those scripts running unnecessarily fetching info at selected intervals.

54. JA1

But AJAX does present a problem with loading unnecessary things. It does probably have a factor to do with the client side beng slow and acting up while others are fine.

55. dumbsearch2

On larger scale websites, sockets do have a very large impact. I've seen it.

You're seeing long-poll requests, which are cheap to set up and return zero data when there is nothing to return.

57. dumbsearch2

And I did get into some of the client-side code.

58. JA1

Question, why was scala chosen when there are so many other languges that are uch more powerful, I mean Python and JAVA are very powerful platforms.

The client side is slow due to a large number of active components that are propagating changes that force more redraws and relayouts and such than are necessary for any given set of changes. We never really got around to optimizing that aspect of things. Here's some good discussion on long polls and sockets: https://groups.google.com/forum/#!searchin/liftweb/socket/liftweb/1fa3rolbnvI/enV5CFm2Rd4J .

There are no languages that are “much more powerful” than Scala. There are some languages that approach problems differently. Scala runs on a proven platform (the Java Virtual Machine) that has had hundreds of thousands of man-hours poured into its scalability and deployment stories.

61. JA1

I love this guy, he teaches us so much v.v

It also provided us a ridiculously high developer productivity, and large compile-time guarantees that reduced the need for separate testing.

63. JA1

Ah I see

That, and Lift is in Scala. It's got some of the best abstractions and approaches to web development I've seen since I started working on the web.

65. dumbsearch2

Despite being a programmer, thank you for debunking some long-time myths!

66. JA1

He is truly a yoda of OS

67. dumbsearch2

I also heard a lot of people saying how inefficient PHP is speed-wise... Something I didn't want to believe, being quite a programmer of it! Thanks for debunking these rumors :-)

Don't get me wrong, I'm not saying PHP isn't slower than many other languages. What I'm saying is there are many situations where that *just doesn't matter*.

69. dumbsearch2

Hmm. I noticed that too.

70. dumbsearch2

But don't you think that they'res a reason why Facebook has a framework for converting the PHP code to C++? I think it's very subtle. So your point is that it would only matter on a very large website.

I would also encourage you to move outside of PHP. Not because PHP is good or bad or better or worse, but because there are few things as useful to a programmer as the ability to move between languages.

72. dumbsearch2

Indeed.

Yes. Facebook was running 13 million queries per second in their backend sometime in 2010, and they've only grown since then. Their scale is ridiculous, and there are only a handful of sites out there that ever need to scale to that level. Twitter, by the way, uses Scala in their backend.

74. JA1

What about a DJango + Pusher type thing?

< shrug > That's a perfectly viable opportunity.

Er… Option heh.

77. dumbsearch2

@uri why don't you give @shadowfiend the medal? he deserves it! ;)

79. JA1

But I do think OS is good as is, but there are just so many option out there, not to mention that we need some SERIOUS optimizing done to make it work smoother.

80. ChrisJP

I humble at the feet of all of you :l *bows*

81. Dean.Shyy

Some browsers have source inspection. Take a look at the source and see what programming language is utilized. Maybe that will help.

82. JA1

Um no, that's only client side @Dean.Shyy

83. JA1

The javascript, html, css, ajax type thing.

Lift actually leaves some traces in the client side, as well ;)

All right folks, that's it for me. Time to get back to work. Have a good one!

86. JA1

Yes I saw the lift files

87. dumbsearch2

I know, @shadowfiend I saw some JavaScript referencing to the Lift

88. JA1

Goodbye master *bows*

89. dumbsearch2

What about node.js? I'm quite a pro at JavaScript, and I'm wondering about node.js

90. dumbsearch2

as a server language

91. JA1

I hope your trip back to coding planet is smooth.

92. dumbsearch2

BTW @shadowfiend I never knew that Twitter was done with some Scala!!

93. JA1

It says on the scala page. thats how I found out lol

My opinion? Don't bother. There's nothing interesting about using node.js on the server, and if you get a job that requires you to use it you'll be able to learn it fast. Pick something more challenging. Clojure, Scala, something like that.

95. dumbsearch2

Whats wrong about node.js? It seems to work beautifully smooth

96. dumbsearch2

Python?

By the way @shadowfiend Why doesnt upenstudy update their mathjax and LaTeX version so we can use the full version?

98. JA1

Actually more like a django interface

99. dumbsearch2

BTW you seem to love Java-similar languages @shadowfiend ;)

100. JA1

Well JAVA is very powerful, no surprise he would use it since he is very knowledgeable on the best languages xD

101. dumbsearch2

@shadowfiend had actually shown me on another post the Lift-part of OpenStudy, and how I could use it as an API.

102. dumbsearch2

@JA1 I've heard Java being criticized for it's messy syntax. Dunno if it's another rumor.

That was enough to bring me back for a second—avoid Java at all costs. It's basically the lamest language out there. In my opinion :p Others disagree ;)

104. JA1

It's bloated yes, but it's a good option I don't like it myself but hey, it's out there xD

105. dumbsearch2

Really? But I've heard that Scala and Clojure seem similar to Java...

106. JA1

I love how he came back after that comment xD

Node is kind of boring, presents very little that is new to web development, and uses an approach to concurrency that is fundamentally confusing instead of making it clearer (strictly speaking, it isn't concurrency, but whatever).

108. JA1

I vety much like DJango frame with python, It just calls me for some reason :/

109. dumbsearch2

Hmm. It's trying to mix JavaScript and server, so its not really original aka worth learning ?

Both of those run on the Java virtual machine, but that doesn't mean they're like Java. Scala shares some superficial features with Java, but is a very very different language.

The only interesting thing, in my opinion, about Node, is the ability to run certain parts of your code identically on server and client.

112. dumbsearch2

Alright :)

113. JA1

Scala simply runs in the same environment as JAVA

Now I'm really out. Don't provoke me again :p

115. dumbsearch2

Thats why I was interesting shadow, though maybe I shouldn't try to adopt a language which I already know a lot of, and maybe I should just start something entirely different :)

116. dumbsearch2

117. JA1

Okay *stops all JAVA appraisal*

118. dumbsearch2

I wish you could be our admin again

Me too @dumbsearch2

120. JA1

I hope you never leave OS, you are the only hope we have :'(

He is an admin, just without coding.

122. JA1

He can still code.

123. dumbsearch2

But he doesn't for OpenStudy anymore.

Yes, but he no longer codes for openstudy. He has admin privs just doesnt work for OS

125. JA1

Yes but he has the access to do it, just he doens't work here anymore.

126. JA1

Forever will we miss you shadow, all we have now are supposed "admins" but I fear we have little to none xD

127. JA1

They are ghost admins lol right @dumbsearch2

"Access" yes. Technically a person who works at area 51 has indefinet access to the facilities as long as they dont give up information. Now, am I comparing @shadowfiend to someone who works at area 51 no. Nor, am i comparing Openstudy to area 51. We still have a great team of admins but the original's were still very much the best of the best.

The spelling in that sucked

130. dumbsearch2

Lol. What team of admins. List one new feature

131. dumbsearch2

Or fix

132. JA1

xD @dumbsearch2

*indefinite

134. dumbsearch2

Is seems like the main problem is that the server is really slow thats why it takes so long to connect to it using the JavaScript code. NOW I'm wondering why doesn't OpenStudy get new servers

135. JA1

All we have are amazon techs and maybe a few (1-4) admins who just put bandaids on this website.

Does Chris still work on the site?

137. dumbsearch2

1-4 admins? Lol I guess 1

138. JA1

Spruge?

139. JA1

xD dum

140. JA1

sprauge*

Yes Ja. Does he?

142. dumbsearch2

The problem lies with the congestion with the servers Interesting!

143. JA1

Chris abandoned the ship a long time ago.

144. dumbsearch2

HMM

Exactly! Now if we could only get some blasted funding to the site to get larger better servers we could expand the site tremendously.

146. dumbsearch2

147. zscdragon

man.. if only electrons move faster..

148. zscdragon

haha sure ;)

149. JA1

We need to write a letter to Bill Gates and have him fund us again.

150. JA1

@billgates

151. JA1

lol

@.Sam. should delete this with an absolute disregard for all things historical simply out of the meanness in his heart...

153. dumbsearch2

da heq?

154. JA1

Actually, we should seriously write him, he is a philanthropist.

Lol he is also a masseuse

156. dumbsearch2

Anyways, now I won't have to go through the burden of going through all my PHP code for my social media site and convert it to node.js and sockets. Byebye! :) Off to programming!

@shadowfiend Works full time as a Masseuse...I know because it shows up in hidden places all over the site.

158. JA1

Honestly OS needs a revamp, forget the Hackathon, it's too small with not many coders, we need to start writing some letters, calling some numbers, and get some serious funding and get new admins, new servers, bring back the old admins and have them help out with the new site, then get some good collaboration from users and get new mods, new system, neew everyhting, we need to respark that candle that is long since turned off.

159. JA1

Who here agrees!

160. thomaster

$$\sf\Large +1$$

161. JA1

But jokes aside, we really need something new, OS is dying, maybe not as fast as we think but it is dying. @Preetha

162. dumbsearch2

Yes. And we three programmers could help when necessary :)

163. JA1

*cough* I am not a programmer *cough*

164. JA1

But heck, I could learn in no time, the only reason I don't l know much programming is because I have no motivation to learn, but if we were to seriously make this new OS I would pitch in 140%

165. JA1

Scala is a relatively easy language, and besides, I got a couple of buddies that would help wonders here.

166. dumbsearch2

It is *not* easy, @JA1 But you're smart :) You could learn in like 2 months :)

167. dumbsearch2

But at least we're developing a mobile app. And the future is in mobile... http://openstudy.com/study#/updates/51d86b86e4b015ed74216169

169. dumbsearch2

Lol

170. JA1

PSSHTT you underestimate me dumb, I know nothing about programming, but I can learn any language in under one month, scala is a fancy JAVA nothing more.

171. JA1

I learned HTML/CSS in under a week but then again that's a grade school langauge lol

172. dumbsearch2

2 months is very short to *master* a language.

173. JA1

Obkect oriented is much harder

174. dumbsearch2

You learned every single CSS code in a week? Lol

175. JA1

Master is another concept, just the basics is what you need.

176. dumbsearch2

Depends

177. JA1

When using javascript you can't memorize everything, you simply apply a little bit to what you need.

178. dumbsearch2

Lol xD I know you could do it... Haha

179. dumbsearch2

Let's start soon.

180. JA1

But I need motivation ;-; @Preetha

181. dumbsearch2

I have to be heading out for some programming, so see you peoples :)

BULL! Not to be rude AT ALL, but there is no way under the sun to fully learn and flawlessly execute a coding language in under one week. ANY coding language. That is just as difficult as learning Japanese in a week and speaking it fluently.

183. JA1

If preetha goes down with this new funding and new OS thing then I will quickly join in.

184. zscdragon

damn u guys are such geniuses.. :S

185. dumbsearch2

aw, nah @zscdragon :]

186. JA1

HTML is a basic language and is not object oriented, very easy to learn in one week....

How old are you guys anyway.

188. dumbsearch2

HTML, yes, (if you work on it a lot), but CSS, NO.

189. JA1

CSS may take longer to "master" but HTML can be learned in days xD

190. dumbsearch2

@SnuggieLad Take a chill pill. Are you okay?

192. JA1

<j1>this is easy dawg</h1>

193. JA1

oops h*

194. dumbsearch2

You don't know, snuggie? Let's turn that back to you. How old are YOU?

195. JA1

He is 17..

17

197. JA1

I have the memory of an elephant...

198. dumbsearch2

It took me a year to master PHP and JavaScript. This is, master. @JA1 BTW lets invent the <ja> tag haha

199. dumbsearch2

@SnuggieLad Why does it matter? Your question appears to be a direct result of wanting to be rude

200. JA1

xD that would be rad, and yes but javascript is a LONG langauge and there is much to learn.

201. thomaster

You're going to break the record for longest post :P

202. JA1

@hartnn you are so chill xD

203. JA1

lol that's what happens but oh well, preetha get's the message of the whole revolution thing.

204. JA1

good we all chill now #sochill

205. uri

I'm deleting it. ":3

206. dumbsearch2

We'll all be chill then ;p

207. uri

<3

208. dumbsearch2

<3

209. JA1

WE STILL FIGHTING geezus

Forgive ok...Forget No. No, We are not fighting.

Not me.

212. uri

i didnt eevryone saw you were abusing are very respectable user @SnuggieLad not once,But like 10 times :3

213. uri

our*

Thank you Uri

215. JA1

xD uri

216. JA1

History < FUTURE

Forgiven as I said sean. But not forgotten.

218. uri
219. JA1

But if you forgave him no need to feel any resentment towards him.

220. JA1

lol uri

221. uri

I wish i could give snuggie the medal.

222. uri

but thomas gets it xD

223. dumbsearch2

Shadowfiend deserves the medal :) He is so intelligent!

224. uri

For you? for me thomas.

225. dumbsearch2

Thomaster is so smart too :)

226. thomaster

This is getting awkward haha

227. uri

Intelligent,creative,smart,cute =thomaster.

228. dumbsearch2

yep :)

229. dumbsearch2

I agree, fully.

230. uri

Sarcasm ^ aye :P

231. dumbsearch2

No, not sarcasm.

232. dumbsearch2

He is really smart.

233. thomaster

234. uri

HAHA $$\Huge\color{red}{}$$

235. dumbsearch2

haha

236. JA1

Okay I am off guys, and uri be nice to dumbby and seriously no more arguing over such a mediocre topic.

237. dumbsearch2

Me too :) Bye all

238. JA1

tata~