r/programming • • May 15 '15

A website coding itself live

http://strml.net
4.9k Upvotes

418 comments sorted by

View all comments

288

u/nwoolls May 15 '15

139

u/STRML May 15 '15

This is based on that work. I didn't expect this to end up on here or on HN (I didn't post it, and I don't know who did), I simply made it in an afternoon and change for fun to expand on the concept and to create a more entertaining way to present a list of my work. It's not a serious project.

I am not sure if Jake is the first to do this kind of animation but he's definitely where I got the inspiration from. As you can see from the source, the idea is expanded in many ways.

In any case, I've added a small credit to his name at the end of the animation. Jake does impressive work and he deserves credit.

10

u/scorcher24 May 15 '15

It was really nice to look at and I learned some new css. Thanks for making it, was entertaining and teached me something.

10

u/doubleme_w May 17 '15 edited May 17 '15

Hey this is Jake. I have no problem with your site. As far as I know, I am the first to do this. Going through the source, you made this insanely complex, definitely changed/added enough things for me to not have a problem with it. If anyone is interested, I wrote one a while back that writes and runs Javascript and not just CSS:

pen#JoVrdw

/u/STRML, you have no beef with me. although would you mind linking to my CodePen profile http://codepen.io/jakealbaugh/ in the credits so people can actually see my work? Thanks

4

u/STRML May 18 '15

http://codepen.io/jakealbaugh/

You've got it. I added the URL to the end. Thanks for the great inspiration.

2

u/doubleme_w May 19 '15

awesome. thanks for the shout. you on codepen? friendsies?

2

u/STRML May 19 '15

I wasn't; just created an account and added you. I like codepen a lot but never put anything on it. I'm going to try adding a few of my projects.

9

u/SelfConcentrate May 15 '15

You are Sam, CTO of BitMEX, (Bitcoin Mercantile Exchange) right?

17

u/STRML May 15 '15

Yes, that's me.

30

u/cehmu May 16 '15

Can you start making the price of BTC go up again, please?

4

u/ivosaurus May 16 '15

As an observer who might be interested in getting some someday, I would like down, please.

→ More replies (1)
→ More replies (1)

131

u/Vuccappella May 15 '15

if u watch the whole thing at the end it says this

" * Thanks to Jake Albaugh, who was the first (that I know of) to do

  • a page like this. Some of the autotyping and syntax highlighting

  • code is based off his work. "

so yes, it was clearly inspired by him.

67

u/cincodenada May 15 '15

See the author's comment below - it seems this comment was added after this was posted, due to the very comment you're replying to. I certainly don't recall seeing it when I watched it all earlier today.

18

u/Lurking_Grue May 15 '15

You mean he is watching? *Looks about*

20

u/spkr4thedead51 May 15 '15

Both of these bother me because the styles are applied before the closing } is added

30

u/cincodenada May 15 '15

Blame your browser, not the code. Albaugh's version states that it's being directly injected into a <style> element, so there's no magic trickery going on. Indeed, it seems most browsers will happily apply styles before the brace is closed. I whipped up a quick jsfiddle so you can see for yourself.

7

u/spkr4thedead51 May 15 '15

that's disconcerting

16

u/akaliant May 15 '15

Just one of the many ways that browsers are very forgiving for what they assume to be programming errors.

14

u/STRML May 15 '15

Yep - in fact, I ended up adding logic near the end of development to not actually commit the line to the <style> tag until reaching a semicolon, because the browser will happily start applying styles right in the middle of an incomplete definition, causing bizarre colors to animate or windows to fly all over the screen. Well, even more than they already do.

17

u/PersianMG May 15 '15

plagiarized?

40

u/[deleted] May 15 '15 edited May 15 '15

Including the link nwoolis posted, this is the third or fourth time I've seen something like this. I wouldn't call it plagiarism unless the creator copied another's code line for line. It's clear this isn't the case though.

Seeing another's creation and then deciding to make your own take on it isn't plagiarism, it's just inspiration.

13

u/jimdidr May 15 '15

I just got it running (with plain JS/HTML/CSS on a LAMP server) to see how it works(cause, learning), here are the steps.

(so you don't need to install a node server and CoffeeScript, but rather use a plain old LAMP/WAMP server)

  • Then you will need JQuery:

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <!-- google hosted jQuery2-->

now create a basic HTML file, save the js code in a .js file, in the html file load the JQuery.js file then load the .js from the site.

I only post this so people who want to try to understand it don't give up too fast

I will never claim this as my code.

14

u/STRML May 15 '15

You can the above posted project working from my repository if you like (requires nodeJS)

git clone https://github.com/STRML/strml.net.git
cd strml.net
npm install
npm run dev

Open http://localhost:4003/index-dev.html

That's it!

→ More replies (4)
→ More replies (24)
→ More replies (9)