[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
/wdg/ - Web Development General
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 349
Thread images: 26
File: 1449507899971.png (747 KB, 824x553) Image search: [iqdb] [SauceNao] [Google]
1449507899971.png
747 KB, 824x553
Reminder: you may choose to use any language you want for a backend.

>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning materials
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/

>Frontend development
https://github.com/dypsilon/frontend-dev-bookmarks

>Backend development
https://en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks

>Useful tools
https://pastebin.com/q5nB1Npt/
https://libraries.io/ - Discover new open source libraries, modules and frameworks and keep track of ones you depend upon.
https://developer.mozilla.org/en-US/docs/Web - Guides for HTML, CSS, JS, Web APIs & more.

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/

>Use these sites to paste large amounts of code
https://jsfiddle.net/
https://jsbin.com/
http://codepen.io/

Old thread: >>52681445
>>
Do I need to know Node, npm, Gulp and React/Angular as a Jr front end?
>>
>>52694969
No to node, probably not npm or gulp, maybe angular and react is extremely unlikely.

Do you know your jQuery? Have you used Ajax requests?
>>
3st for PHP.
>>
Still looking for the best book to learn Javascript with? Any recs?
>>
>>52695020
Currently learning object oriented JS and I know some jQuery. I've seen a few guides on Ajax but nothing too in depth.

I know fuck all about the server side so I don't know if there's a way to fiddle around with Ajax and see how it actually works without having to buy hosting
>>
>>52695041
Know any other languages? If so, why not just learn whilst doing a project? If you know a C like language it'll come naturally, the only real gotcha to get started is the "onload" event http://www.w3schools.com/jsref/event_onload.asp is the main function.

After that, just Google things you want your website to do and include them.

Sorry, but few of us learned JavaScript in a book.
>>
>>52694969
>Do I need to know Node
Definitely a good skill to have, can probably pick up a first job without it

>npm
NPM comes with basically every install of node and there's nothing to learn

>Gulp
Yeah, gulp or grunt will be a fixture in a ton of shops

>React/Angular
Again, not need to know for a first job but if you don't have experience with at least one MVVM I think you're missing out on a host of really important ideas in UI programming.
>>
>>52695090
I know python, c++, java, scheme. I'm a computer science student so I'm used to learning languages from books.
>>
>>52695146
well theres this

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
>>
>>52695086
>Currently learning object oriented JS and I know some jQuery.
JQuery is pretty much what 90% of businesses are okay with if you're doing contracting. IMO you don't actually need much else for 90% of problems.

Also, it gives you Ajax.

>I've seen a few guides on Ajax but nothing too in depth.
Unless you're doing html forms, in which case you're going to have a fun time getting a dynamic website, you're going to need Ajax to work with your client's backend/database, however that works isn't your concern as a front end dev though.

Yes, know Ajax. You'll never know when suddenly you have to do a delete request and your current version of html only does post and get.

>I know fuck all about the server side
Node can be set up to return simple strings (look for the node.js hello world). From there you can call the url from an Ajax request and do what you will (log, alert, append). You're not really learning the nitty gritty of backend, but it'll give you a good idea as a front end.

The next trick is getting around cors... I did it with nginx, basically you host your html/javascript through it and make a location to the application port your backend is using. Then you can make requests to /location/request?variable or whatever, where location is whatever you make it in nginx.

>>52695146
It's the 21st century and few languages are complicated enough not to be able to hack code in just via the online references, use your Google foo.

Also, you learn more by practice.

Honestly if you know c++ and Java, then you can learn JavaScript through doing a project.
>>
>>52694969
just know javascript/hmtl/css really well. those other things can be learned in a day or two as needed.
>>
I was told to come here

Im 99% sure I passed my Facebook final interview
>>
>>52695453
For what? Customer support?
>>
>>52695536
Frontend engineering internship
>>
>>52695552
If that's true, then congratz, anon. A good internship is the first door. I was hired from the company just when I was about to finish my interships in said company, so wish you the best of lucks.
>>
>>52695627
Ya I reeeeealy want to convert it to fulltime. Any tips? How do I make sure I stand out? MPK's office is fucking huge with loads of interns

Also Im not a junior. Will that stop them from hiring me fulltime?
>>
if i wanna learn "advanced" javascript, what should i learn?
>>
>>52695693
Haha I asked the same thing several months ago.

Do you know what "context" is and how to use it? Do you know apply/call? Object.create? can you traverse the DOM? Can you curry functions? Can you implement your own reduce function? Do you know map, foreach, and filter? Array.from? Array.isArray?

Those are some good ones to start with
>>
>>52695732

Lel no

Tutorials on this stuff? I'm trying to re write an asp MVC using JavaScript
>>
>>52695772
> ASP

What year is it and why is it no longer 2016?

You're not looking for advanced Javascript then. Youre looking for basic stuff still lol
>>
Death to PHP
>>
>>52695800

Ok can you tell me how leafly.com was made? Besides HTML and CSS stuff. Like how they did their products and all the back end communications going on to grab data
>>
>>52695934
I suggest you do a little more research on your own. You may not be aware, but all of this information is readily available via google. Your low effort questions show you are more interested in me doing all the work for you
>>
>>52695934

Node and JSON
>>
>tfw no one gives a shit about your open source projects

Always 0 stars
>>
>>52695991
JSON via AJAX you mean? JSON on its own wont get you very far lol
>>
>>52696053
JSON is turing complete it is literally perfect and readable unlike that abomination named XML I mean attributes I'm literally throwing up in my mouth right now

fucking pancakefag
>>
>>52695664
Just have fun. Both my boss and sub boss liked me because I messed up with the team and helped them with everything they needed. Don't be afraid of asking: I didn't even know how a server looked like and now I'm the second one who knows most about Linux servers in my team; I didn't even know how a payroll worked and 3 months later they rely on my when something payroll related explodes. I did learn because I asked and when they asked me if I felt prepared to do something, I always answered yes.

They hired me too because I knew more Java than 8/9 members of the team, so it relays a lot in your luck as well.
>>
>>52696247
I'm pretty average when it comes to Java. Most of my experience is in web development. But I also have a pretty solid CS fundamentals knowledge.

So will me being a freshman be a problem for converting to fulltime?
>>
>>52696299
You may be able to jump into Web Development with Java pretty easily using something like Play framework or Dropwizard.
>>
>>52696349
Oh it's no worries. I use Java for most of my school work so I get plenty of practice with it. I just dont enjoy it as much as I enjoy Javascript

I also got asked an HTML+CSS question. I wasnt expecting that lol
>>
>>52696075
>JSON is turing complete
oh god, someone is going to read this and it'll become a meme. I just know it.
>>
>>52696820
Ya I didnt bother replying when I read that lol
>>
File: nodejs-2560x1440.png (2 MB, 2560x1440) Image search: [iqdb] [SauceNao] [Google]
nodejs-2560x1440.png
2 MB, 2560x1440
what does /g/ think about node.js? I'm on the fence
>>
>>52697227
I love it! But you cant go into it with any preconceived notions. You have to just accept it as it is and then relearn everything you know about client-server interaction
>>
>>52697261
Yeah, I guess that's a good way of looking at it. I'm coming from a background of PHP and Java applications... so node just seems so different.

Looking forward to getting better at it
>>
Reminder to love your css selectors :3
>>
>>52697282
Please dont try and write classes. Use factory functions and interfaces. I highly suggest TypeScript. You'll feel a lot more comfortable than normal Javascript
>>
Do I need any background to learn flask? Is just knowing basic python (and obviously html/css/javascript) enough?
>>
>>52697292
And know how to recognize relative specificity!
>>
>>52697282
>background of php
literally throw it away, incinerate it, and sprinkle the ashes into some volcano, especially when it comes to node.bs
>>
Has anyone used ReactJS in a professional environment? We are looking to move towards a new frontend framework to replace KnockoutJS and are considering ReactJS, Angular, and Aurelia.
>>
>getting back into playing with pure css
>forget how much fun it is
clip
all
the
paths
>>
>>52697314
What is the use case?

If you have lots and lots of data that updates on the fly on the page, use React

Otherwise use Angular
>>
>>52697294
Agree on TypeScript, we have used it to write our client side code with KnockoutJS and its great to work with.
>>
>>52697340
I like plain Javascript better, but I always recommend it to those that are used to strong types
>>
>>52697335
We are looking to use it for Web Application development for a couple of our clients. Backend will be written in C# using ASP.NET Web API so we are pretty flexible on client side frameworks at this point. In regards to large data sets, I assume you don't want to use Angular because of the digest cycle?
>>
>>52697372
Angular doesnt have the same rendering speed capabilities that React has

Also, React can prerender HTML on the server which is pretty cool
>>
For the weebs:

I'm building a Rails API (basic first iteration is done) and will add some SPA frontend later. Project is supposed to be an open manga database with user reviews and such.

Anyone interested in helping? It's an OSS project intended to be run by the community.
>>
>>52697368
Yeah I have quite a few coworkers and friends who enjoy JavaScript because its not strongly typed. I feel like TypeScript is much easier to debug though, at least in my experience.
>>
>>52697416
Ya if you get someone that doesnt know what the fuck they're doing and introduces a bunch of bugs, I agree it's harder to debug.
>>
>>52697399
>manga
take a time travel machine back to 1999 gramps
>>
>>52697397
Thats pretty cool I did not know that it can prerender HTML on the server side. How is the learning curve compared to AngularJS?
>>
>>52697438
It's pretty steep. React is unlike anything else and you really have to accept that some of the design decisions they made were made for a reason. If you want to take it all in at once, use a Node server and write it all in JSX instead of JS
>>
>>52697425
Oh yeah for sure I've definitely seen some ridiculous JavaScript. I do like the direction they are heading with ES6 though. Having actual classes and lambdas in JS really makes it feel like TypeScript.
>>
Python 2.7, web2py.
I have the following:
index.html
X = 1
Y = 1
def index():
Z = X + Y
results.html
DISPLAY Z
def results():
DISPLAY Z

Basically, I have values in index() that I want to send over to results() so I can display it. Values are just a couple of integers and strings.
Clues? Shit isn't even my assignment, it's my thesis. The whole thing is pretty much done, just need to display my results.
>>
>>52697487
Also interfaces. Im a huge fan of factory functions combined with interfaces. It's so liberating to have OOP *without* inheritance!!!

Have you looked at ES7? It's going to be fucking amazing

https://www.youtube.com/watch?v=lil4YCCXRYc
>>
>>52697469
I see. I'll have to look into React, it seems like it may stick around longer than AngularJS unless version 2.0 takes off.
>>
>>52697516
Yeah I really love the fact that they have interfaces. Most of my experience is with C# so having OOP capabilities in JavaScript makes me feel more at home. I haven't looked into ES7 though, I will have to check that out.
>>
>>52697531
> unless version 2.0 takes off

It wont. They had their chance. But when they made 2.0 incompatible with 1.0, they "showed their hand" and now no one trusts them to not do it again!

Hopefully Ill be one of the people working on React in the near future. Facebook did a good job with the design and they wont be shifting away from it any time soon but I promise that if/when Im on that team Ill always be an advocate for backwards compatibility. I was the one that had the facebook frontend interview today :)
>>
>>52697561
Oh nice congrats on getting an interview with them. Do you mind if I ask what questions they asked? I interviewed at Amazon and got a offer but did not accept it since I was still in school. The interview was probably the most difficult one I've experienced yet.
>>
>>52688977
>Or it could just be that PHP is and always was fundamentally a broken language (...) and we're now starting to get more viable alternatives.
That's a given. But that's not the reason I was given for us dumping php.
>>
>>52697556
If you think about it, what does inheritance gain you exactly? Factory functions with interfaces can do everything classes can *and* it doesnt force a particular structure. With FFs literally *all* of your objects could be different. You dont need new classes for each one though. Instead you just call the factory function with a list of interfaces you want it to support. That's all there is to it. And if you want static fields and methods, there's nothing stoping you from just having an object to contain all of that. In Java you're not supposed to call static methods off of the instance identifier anyway! So there's really no reason to package them together, imo
>>
>>52697583
Under an NDA! Sorry D:

But basically, I studied *very* indepth with CSS, HTML and Javascript. I mean all the tiniest little details. And at the same time I have to know all the classic algos and understand time and space complexity and whatever else CS majors are supposed to know. Shit's not easy

Im still in school myself. I just finished my first semester of college :D But I plan on dropping out for the job. I fucking hate being a student
>>
>>52697294
Thanks for the suggestion. I haven't used TypeScript before. For sure going to check it out now. That code looks so sexy. I feel right back at home.
>>
>need to have user be able to edit some fields like phone number, name, address, other text fields
>don't want to be hassled with setting up a mysql database for tables that will only have 1 row each
>thinking about storing all the info as JSON in a file
>would read this in with whatever PHP's gulp() function is
>and then call json_decode
>if user submits form, just overwrite appropriate values and write that to file with json_encode
is this a good idea
>>
>>52697637
Thought you would :)

But as I said, NO CLASSES! Im a Javascript freak so Im pretty comfortable with using classes, but if you dont live and breathe the language, you'll end up doing it wrong. Im just telling you now to save you the headache of figuring it out on your own later
>>
>>52697596
I do like the idea of that. I've actually never implemented that design pattern but I would like to give it a shot on my next C# project that I build from scratch.
>>
>>52697310
so you don't like PHP or node.js? What do you write your web apps in?
>>
>>52697640
You just described a poorly hacked together version on MongoDB. Just use the real thing with the fully built-up API :)
>>
>>52697658
Node is great m8, the bs was an honest accident
>>
>>52697652
It'll save you from ever having to decide what your class structure is. You no longer need that hierarchy! You just make objects do what you what them to do directly. If you know for a fact that certain fields or methods will never be used outside of the obejct itself, you dont even need an interface! You can just add custom key-val pairs to your heart's content without it fucking with anything else in the application
>>
>>52697622
Ahh I understand, not worth taking a risk and missing out on the opportunity. Knowing the algorithms, time complexity, and data structures seemed to help a lot in the interview. It seems like most of the big tech companies focus on most of those concepts. I felt the same way about school when I was still in it. I was lucky enough to be able to work as a developer during my undergraduate so that helped a lot as well. Tbh though I feel like 80% of the degree is useless if you want to be a Software Engineer.
>>
>>52697679
I might end up taking classes part time and finish my degree over several years, but right now I just want to work and Facebook seems to be interested in me (which is something most people dont believe since Im only 19, but if you know your shit they dont care how young or old you are)
>>
After my boss told me he doesn't care about education at all and the fact that you can learn everything using Google, I got moldy depressed knowing I spent a lot of time and money on school. Now I have to pay back loans. Should have bought a few books from Amazon and googled my mind off. Fuck. Oh well at least I got a job....r-right?
>>
>>52697730
Where do you work?
>>
>>52697698
I agree, in my experience most places do not necessarily care what degree you have, they really just want to see if you understand the programming concepts.
>>
>>52697750
Which, IMO, I do pretty well. There is definitely stuff I dont know, but I plan to keep learning as I go! That's the fun of it, right?
>>
>>52697730
As long as your boss doesn't think learning everything from google = exclusively utilizing google as your problem solving tool, then he's right.

>>52697761
> but I plan to keep learning as I go! That's the fun of it, right?
Can actually hear the prep just by reading this tbqh
>>
A degree is only really important in that you can negotiate a larger wage when you have it.
>>
>>52697739

Small but successful company in Seattle area. You probably haven't heard of it. It's not important. The stuff I'm currently doing I've known for a long time just from doing random projects at home. The direction the company wans to go I can learn the stuff from the Internet. School is literally pointless unless you're that desperate that you need an education system to motivate you to learn.
>>
>>52697761
Exactly. I feel like always willing to learn and expand your skill set is what separates a great developer from a good one.
>>
>>52697780
This doesn't work in twenty sixteen. Your degree is only really important in demonstrating commitment. It won't help with larger wages. By the time you can negotiate a larger wage, you should have experience and a portfolio to back your claims.
>>
>>52697778
> the prep
Like "preppy" as in a douche bag? Not sure I follow.....

> A degree is only really important in that you can negotiate a larger wage when you have it.

I think Facebook pays enough to nullify any gains a degree would have

> Small but successful company in Seattle area

Nice! Seattle is my location of choice
>>
>>52697797

Because writing to file is SLOW, you mongoloid
>>
>>52697797
Because the asymptotic complexity of your shitty algo is insane!

But your probably just another copy paste web dev so I guess I shouldnt have expected anything better
>>
>>52697659
Why go to the trouble of using mongoDB when I can just
$fn = "some.json";
// Read in the saved json
$myJson = json_decode(file_get_contents($fn), true);

// overwrite previous values with all user submitted info
foreach ($_POST as $key => $value)
$myJson->{$key} = $value;

// write the new json to the file
file_put_contents($fn, json_encode($myJson));


How's that?
For the overwriting/foreach loop part, it'd be more complicated, with server-side validation and stuff.

>>52697816
Hey, now, I don't think it's that slow
>>
>>52697811
>Like "preppy" as in a douche bag?
No, preppy as in high school musical preppy. When has preppy ever meant douchebag?
>>
>>52697818
Hold up.
What's complex about overwriting the original contents of a file with whatever's in the $_POST?
There's only one file read and one file write operation
>>
>>52697800
That's why I like to do more than just web stuff. As much as I love web, I like expanding my knowledge.

Except mobile apps....... I fucking hate IDEs so I simply cant stomach mobile app development

>>52697822
So you do think Im preppy? Alright. Guess I dont know what to make of that
>>
>>52697805

Yep this is true. When you're in the actual work place and higher management sees what you're all about and finds out who's the best at solving problems, that's the fucker that gets paid the most. A degree looks great on paper though!
>>
>>52697838
The fact that you down know the term asymptotic complexity further amplifies how much of a shit tear engineer you are. You know nothing of computer science!
>>
>>52697797
This seems like it would be ok in a small application. But I feel like it could get a bit disorganized in a large application with a large data set with a need for relationships.
>>
>>52697858
dont know*
>>
>>52697842
I use Visual Studio 2015 where I work so I still use an IDE and enjoy it for the most part. Tbh though couldn't you do mobile app development using HTML, CSS, and JS? I'm pretty sure that's what Apache Cordova is if I'm not mistaken. I know its not the same as native code but it seems appropriate for some mobile apps.
>>
>>52697858
Actually I googled it, and it doesn't show up on the first wikipedia article result
>>
>>52697899
>Tbh though couldn't you do mobile app development using HTML, CSS, and JS? I
Some of the greatest minds in web dev have tried to tackle this problem but it simply isnt yet solvable. You just cant write a web app that feels as good as a native one

>Apache Cordova
Ya phonegap is fun to play with, but it's still not good enough lol

>>52697909
Wow. You got a whole Google result down the page. Congrats on your new found replacement for a formal education.

Ever heard of youtube? Search "big o"
>>
>>52697919

Big o notation is important however for web devs it's not something they should be busting their balls over is it?
>>
>>52697932
If you want to be considered an engineer and not just a "web dev".

The people that developed things like React and Angular heavily leveraged their CS knowledge in order to make fast code that's flexible and maintainable
>>
>>52697899
>Tbh though couldn't you do mobile app development using HTML, CSS, and JS?
You could, but you shouldn't right now, you shouldn't need to either.
>>
How hard is it to learn ruby on rails and node.js after already learning one backend language (like django)?
>>
>>52697961
Subjective.
>>
>>52697919
I know what Big O is,
what I don't know is why your pretentious sounding "asymptotic complexity" matters.

Mongo says it's performed its write operation before it actually has, so it's "faster". Otherwise my solution is pretty darn fine since it doesn't rely on downloading, installing, configuring and querying an entire database.

There's more to this problem than just big o. And how is big o even fucking relevant to the read/write speed of hardware, when all I'm doing is performing ONE read operation and ONE write operation?

It's okay though I know you were trolling
>>
>>52697974

>how is big o even fucking relevant to the read/write speed of hardware

>I know what Big O is

pick one
>>
Anyone else use Go here? It's been my favorite webdev language/environment so far.
>>
>>52698008
Go is for Google fanboys that dont use TypeScript because "Ew Microsoft"
>>
>>52697300
Nope, I started exactly where you are. It's pretty simple. I recommend Miguel Grinberg's tutorial.
>>
>>52698016
I understand the dislike for their operating system but Microsoft makes some awesome dev tools imo.
>>
>>52697399
>SPA

Please don't, it's especially unnecessary for what you're making
>>
>>52698016
Or maybe I just don't want to use the awful shitpile that is Javascript beyond what I have to
>>
>>52697990
Yes but how is big o relevant when at the very minimum, for the persistence layer, you have to READ information from where it's stored, and later WRITE information back?
That's two operations.
T
W
O
operations.
My solution calls file_get_contents, and file_put_contents.
Granted those both call fopen and fclose so it could be sped up by sharing the filehandle and closing only after the job is done, but that aside, it's basically just two operations to retrieve and store data. I don't get how you can beat that. So, you bring up big o, as in the efficiency of my solution is bad. But I don't see how you can beat my solution when you MUST read, and MUST write data for persistence layer.
>>
>>52698041
>awful shitpile that is Javascript
heh heh heh
heh
heh heh
>>
>>52697399
I don't really know rails, but I guess I can beta test for you.
>>
>>52697819
My lord that syntax is fucking disgusting to look at.
>>
>>52698033
To me it sounds like it would be more beneficial to use something like KnockoutJS for something like this in conjunction with an MVC framework. Use KnockoutJS in the cases where you need a client side solution but utilize your server side MVC framework for routing and rendering your views. Don't get me wrong SPAs are cool but this particular use case doesn't seem to require a SPA approach.
>>
>>52698032
Exactly! I love microsoft. Ya they are a bit dinosaur ish, but oh well! they're a great company

>>52698041
Youve never used typescript have you...

>>52698042
Read and write are not single operations. The memory and disk space grow with the size of the data being stored and thereby the time it takes to read it in and output it also increases. It's better if you only read it in once and then occasionally save progress in the event of server crashes instead of rewriting it to disk EVERY TIME!

Youre the type of person that gives web development the bad reputation
>>
>>52697227
It's simple and a real step up from php...

But the reason people start caring about it is because at a glance it's fast, since its hello world responds fast. But as it turns out, the v8 engine might be relatively fast, but slower than other things.

As per the op, you can actually use anything you want for your backend. Personally I use c#, which seems to connect about as fast and likely executes faster. Also, neat code.

>>52697335
Angular is a nice idea, for lots of updates why not a recursive Ajax call? If it returns a whole heap of json, I doubt it'd be too hard to bind it with angular.

Iirc the problem with those sort of pages is repainting?

>>52697397
>Also, React can prerender HTML on the server which is pretty cool
I noticed this.

What is that html though? And where's the other JavaScript?

>>52698016
Go is pretty fast.
>>
>>52698095
> Iirc the problem with those sort of pages is repainting?

Bingo! And that's something Angular doesnt handle well

> What is that html though? And where's the other JavaScript?

The HTML is the same HTML that would be displayed after all the content is loaded on a web page (minus ads) so instead of waiting to paint it all on the client, you can prerender it so once the page is loaded it doesnt need to fulfill a bunch of repainting
>>
>first sem students knowing so much
>the only thing we learned first sem was to not copy code and installing filezilla
death
>>
>>52698041
In my experience JavaScript is not an awful shitpile unless you write it in a way that makes it hard to maintain, difficult to debug, and challenging to understand. I do admit though that JS can allows developers to write sloppy code that still works if they do not follow proper coding standards.
>>
>>52698028

Really? I'm finding it really difficult so far I've only watched one video tutorial and the logic seems pretty simple but all of those header commands and structure of the code is really confusing.

Do you have any other resources I can check out or an idea of what a good first app might be to develop?
>>
>>52698142
When are you going to follow proper grammar standards?
>>
>>52698142
You can find shitty developers in all corners. It just so happens that shitty web devs dont know they're shitty so they talk about themselves as if they are experts
>>
>>52698078
The Rails app is purely a JSON API, no views at all. The idea is that the data should be accessible to other sites and whatnot.

And of course I'm doing it partly as a project to learn technologies I haven't used before.
>>
>>52698095
Imo recursive AJAX calls is a bad idea. Technically this would result in all of your calls being executed sequentially. In this case I feel like using promises to make the call would be a better approach, that way you use the promises to make all of your calls and then wait for them to finish before continuing.
>>
>>52698120
Are you sure angular doesn't handle repainting well? Even jQuery doesn't repaint too badly.

>you can prerender it so once the page is loaded it doesnt need to fulfill a bunch of repainting
Unfortunately by the time I might feasibly need to repaint, I've already touched the backend and came back.

I've generated html from react in C#. No JavaScript.
>>
>>52698189

>using promises

This guy gets it. Async functions will be so sick when they finally come out!
>>
>>52698180
That makes sense then. Nothing wrong with doing it to learn something new.
>>
>>52698153
Lol sorry its been a long day, stayed up way too late after working all week.
>>
>>52698190
>Even jQuery doesn't repaint too badly
I think Crockford just woke up from a nightmare cause by that statement!

It's true that when you have only a few updates going on at a given time that it works ok. The problem comes in though that such a model of using CSS selectors doesnt scale. It becomes very slow the more data you have, the more complex your DOM is, and the faster those updates happen

> Unfortunately by the time I might feasibly need to repaint, I've already touched the backend and came back.

Prerendering is only for the initial page load. After that everything should be rendered and painted on the client side only

> I've generated html from react in C#. No JavaScript.

Id like to learn more about that. Links?
>>
File: CWeYEUvWoAA5Z3V.png (179 KB, 599x572) Image search: [iqdb] [SauceNao] [Google]
CWeYEUvWoAA5Z3V.png
179 KB, 599x572
>>52698142
>I do admit though that JS can allows developers to write sloppy code that still works if they do not follow proper coding standards.

And that's why I stay away from JavaScript wherever I can. I know I'm not an amazing programmer. JS has these weird inconsistencies and behaviors and large parts of it were tacked on rather than deliberately developed, like OOP. There's no clear design philosophy behind it.

Go was designed very deliberately and almost forces you into doing what it considers "best practice." If that means I'm not free to do absolutely every single thing the way I'd like it to, I'm more than happy to accept that, because it means that I can pick up any code regardless of who wrote it or how long ago, and understand what's happening. It does have its own weird behaviors but I'll take them over mountains of callbacks (or needing a separate library just to avoid them) and all sorts of wild behaviors ([] + [] = "" and the billion other ways types interact).

Not to mention, modern JS is getting weird as fuck (pic related). Everyone's just tacking on more and more trying to make an overburdened language do things that it wasn't ever meant to do. I use it where I have to - and my JS does come out clean there - but I stay far away from it everywhere else.
>>
>>52698237
That's a picture of JSX not Javascript you fucking moron.
>>
>>52698237
Yeah I was going to say that looks like ReactJS.
>>
>>52698189
Did a little research, there's async:false and there's setTimeout.

You could use one or either to set up recursive Ajax.

>>52698223
Messing around with reactjs.net

I'm trying to design something using my web library for react users (who must feel very locked to node), it could easily return this html and automatically change the content type, but then what?

Unfortunately, I'm struggling to understand the real "why" behind react js.
>>
>>52698306
I'm not saying it can't be done, its just inefficient from my understanding.
>>
>>52698306
>Unfortunately, I'm struggling to understand the real "why" behind react js.
I suggest you look at some presentations. Here's two that might better explain the why (sorry for the length, but they're both worth it - I listen to these things during my commute and it's great)

https://www.youtube.com/watch?v=68NzBI6RRKE

https://www.youtube.com/watch?v=wA98Coal4jk
>>
>>52698151
Just do this tutorial. You'll get it in no time: http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world
>>
>>52698049
Thanks but the project is not ready for that yet, I'm still working out the API structure.
>>
>>52698331
Yeah, but its front end, and it doesn't need to respond faster than a second. If you've worked in some engineering fields, you'd know that if the client doesn't notice it doesn't matter.

>>52698346
I might comment after watching them.
>>
>>52698447
>it doesn't need to respond faster than a second
The faster your app is, the better user experience you create

> I might comment after watching them.

Im actually heading to bed. Thread will probably be gone by morning. Been nice talking :)
>>
File: 12055591025.jpg (62 KB, 443x332) Image search: [iqdb] [SauceNao] [Google]
12055591025.jpg
62 KB, 443x332
>tfw deleted fb a week ago and my work ethic has increased tenfold
holy shit i never realized how much of a distraction that bullshit is.
>>
Open question, how should jsx files be organised? Unfortunately for server side rendering they need to be somewhere around the backend binary.

>>52698502
>Facebook
Where do you think you are?
>>
>>52698447
True in some cases but if your ajax calls are retrieving large json payloads you do have to worry about faster response times. Sure you can cache this data and compress it but every little bit helps when working with larger data sets.
>>
>>52698542
Json is text...

Sending only fractional changes would mean preserving every individual clients state on the backend. That actually might be more expensive than sending xykb of text compressed in gzip. Remember, text can be compressed really small, my entire db is only around 3kb.

Also, what's wrong with caching? It means if nothing has changed (globally) you get back a 304 that's easily less than 1kb.
>>
File: 1350379453679.jpg (12 KB, 400x389) Image search: [iqdb] [SauceNao] [Google]
1350379453679.jpg
12 KB, 400x389
>mfw my browser suggests facebook.github.io over facebook.com

Am I /wdg/ accepted yet?
>>
dealing with some fairly shitty Python codebase I inherited
found that listening to nasheeds helps me deal with the frustration

feeling weird feels desu fäm

https://www.youtube.com/watch?v=fZjPrcBbRQs

звoн мeчeй: нaшид нeпoкopных
пyть бopьбы - пyть жизни
нaпaдeниe paзpyшaeт тиpaнию
и coкpытиe гoлoca
являeт кpacoтy эхo
>>
>>52698590
True in the smaller scale its not a big deal but thats not always the case imo. I've worked on some pretty large enterprise applications at this point in my career and in my experience your not always working with 3kb of data even with caching and compression.
>>
how long does it honestly take to learn js?
>>
>>52700394
well it took ten days to write it, go figure
>>
>>52700394
First coding language always takes way longer than others.
>>
>http://square.github.io/crossfilter/
Where the fuck is the documentation?
>>
>>52700663
There's an example...
>>
>>52700663
https://github.com/square/crossfilter/wiki/API-Reference
>>
>>52700701
>no quickstart
Fucking dropped.
>>
>>52700575
Being brutally honest and having nothing against JavaScript, but it's a horrible first programming language.

>>52700712
Don't you just want things to be easy?
>>
>>52697659
>MongoDB
Or /dev/null. Works just as well and is even faster.
>>
Im starting to learn webdev on theodinproject and need to make a linux partition to work on, whats a good distribution?
>>
>>52700759
Try linux mint.
>>
>>52698008
It's great. Porting/extending a Node.js imageboard to Go.
>>52698016
Typescript is just a fancy wrapper for JS and does not fix any problems, ES6 doesn't. So how does it relate to Go, exactly?
>>
>>52698237
That's JSX, retard.
>>
>>52697399
bumping this
>>
>>52701006
I actually would love to help. I'm using Knockoutjs for my current project but it's mostly spaghetti at the moment. I'm more experienced in back-end stuff with python and sqlalchemy. Got a github link?

And tell us more about how it will work.
>>
>>52700771
ok i have it on a live usb but when i booted to it i couldnt use my mouse or keyboard
>>
>>52701108
https://github.com/omake/omake-api

I'll try to put some information in the Readme.
>>
http://strawpoll.me/6680164
>>
>>52702186
you forgot ASP.NET, so I guess I'm a faggot.
>>
>>52694944
Is using Codekit/Prepros frown upon? I know how to use Gulp/Grunt, I just hate having a node_modules folder in every single project. It's unnecessary. Also, setting up projects takes time as well. So fuck it, I just drag a folder into Codekit and shit even autoprefixes my SASS.
>>
So I'm doing the FreeCodeCamp thing and I'm having problems with CodePen.

http://codepen.io/lucasecardoso/pen/BjVwLL

That code works fine outside CodePen -- it expands the jumbotrons to fit their respective background images. When I copy it onto CodePen, however, it's shrinking the jumbotron height to fit the contents inside, instead of expanding it to fit the background image. What gives?
>>
>>52702362
I'm not sure what is supposed to happen?
Looks like everything renders correctly?

Do you have a non codepen example how it should look like?
>>
File: ovOsyFB.jpg (65 KB, 1827x1079) Image search: [iqdb] [SauceNao] [Google]
ovOsyFB.jpg
65 KB, 1827x1079
>>52702450

This is what it does when I run it on a browser.
>>
File: ZT1owVW.png (540 KB, 1416x554) Image search: [iqdb] [SauceNao] [Google]
ZT1owVW.png
540 KB, 1416x554
>>52702450

This is what happens when I use CodePen.

I just tried it on jsfiddle and it does the same thing, so I'm assuming it's a bug on my code and browsers are making an assumption CodePen/jsfiddle aren't.
>>
>>52702514
>>52702539
I see.

Looks like you forgot
html, body { 
width: 100%;
height: 100%;
}


in codepen.

http://codepen.io/anon/pen/MKXErX
>>
>>52702576

Whoa, thanks a bunch. Is that a CodePen thing? Do I need to do that for stuff outside of it?
>>
What's the best way to achieve something like this? Like some kind of bars behind my words/sentences, of different widths
>>
>>52702599
the preview is an iframe, the entire page is yours.
>>
>>52702186

FLASK IT UP BOY WE IN THIS BITCH NOW
>>
>>52702617

Cheers mate, I think I get it now.

Took me 15 minutes to come up with that and like an hour to fix it for CodePen, I see I'm destined for great things as a web dev.
>>
>>52702607

put the words in a span, set the background-color of the span and the text colour, add padding-right
>>
>>52702666
thanks a lot!
>>
>>52702607
could do something like this
http://codepen.io/anon/pen/mVKBLE
>>
>>
>>52702718
Woah! That's even cooler! Thanks!
>>
>>
>>
>>52702720
>>52702738
>>52702760
>photograph
>png

fuck you.
>>
How do I get an image to float outside the div like this?
>>
>>52703215
negative margin or transform translation.
>>
>>52703215

margin-left: -x

or

left: x
>>
File: background.jpg (694 KB, 1440x900) Image search: [iqdb] [SauceNao] [Google]
background.jpg
694 KB, 1440x900
>2016
>not utilizing your desktop as a quick resource
>>
>>52703239
>>52703274
Thanks. Margin-left worked perfectly.
>>
>>52703334
>quick resource
>literally all the basis

if you don't know that without having to look at them you might as well kill yourself
>>
>>52703359

>if you dont know all that
>implying you know ever single css and javascript class
>>
>>52703383
nice meme!
>>
>>52703418

...wheres the meme?

autist
>>
>>52703418
>>52703383
>>52703359
>>52703334
Do you guys have shitty text editors? Why don't your editors auto-complete css classes for you?
>>
>>52703456
exactly what I was saying
>>
What's the best way to include "non-default" characters/glyphs? I remember seeing a github a while ago
>>
>>52703215

I would make it all an image (except for the text). if you know basic photoshop it would be really easy. Give it transparency on the left side, save it as png and compress it, then set it as background image in a div and then add the text and align it. But that's just me. Make sure your margin-left is only talking to that particular image so it doesn't mess anything else up
>>
>>52703506
what do you mean non-default?
You mean icons?
Use an icon font or images.
>>
>>52703525

>have optimized svg files
>save them as an image

are you literally retarded? Is this 2005?
>>
File: Capture.png (93 KB, 521x258) Image search: [iqdb] [SauceNao] [Google]
Capture.png
93 KB, 521x258
>>52703525
I'd totally do that, but I need the text to be dynamic (will be pulling it from a databse).
I've go the basic layout set so far, just need to style it more.
>>
>>52694944
What's the best layout for a personal blog?

1/3 Sidebar 2/3 Main content?

stacked sidebar 3/3
main content 3/3
>>
>>52703615

have you at least designed it yet? do you know what you want it to look like?
>>
>>52703576

What? I didn't say anything about svg
>>
>>52703670

my bad misread your comment and thought you were responding to >>52703506
>>
>>52703653
>have you at least designed it yet?
That is the basic design...

>do you know what you want it to look like?
Something like the first pic I posted: >>52703215
>>
>>52703829

add

img {
box-shadow: 0px 10px 70px;
}
>>
File: Capture.png (2 MB, 1080x1920) Image search: [iqdb] [SauceNao] [Google]
Capture.png
2 MB, 1080x1920
Just brushed up my custom css a bit.
>>
>>52702186
>frameworks
>>
>>52704004
>complaining instead of participating
>>
>>52704028
I don't see a "no frameworks" option.
>>
>>52704065
I'm sure you know which option to choose.
>>
>>52704091
>monolithic bloat is good
Sure thing, faggot :^)
>>
>>52698263
>That's a picture of JSX not Javascript you fucking moron.

Top kek retard. That's a screenshot of an ES2016 module which exports a react component connected to redux. Good job recognizing the JSX in the component tho you dip shit noob.
>>
>>52703525

Please time travel back to 2001 and kill yourself.
>>
I can't decide if JSX or TypeScript is more awkward and harmful.
>>
where can i find a good sample of scalable javaScript application architecture?
>>
>>52704879
I really like typescript.
>>
>>52704996
nevermind. found some great links at the github link in the op
>>
>>52704760
JSX isn't Javascript. I'll just assume you're retarded.
>>
>>52703940
>how to fuck everything up through CSS: the image

THE USER EXPERIENCE
M A T T E R S
>>
>>52704879
Both are shit. Just use ES6 and maybe Flow, if you want static type hints.
>>
JS scoping question:

I understand that JS has (for the most part) function-based scoping.

Is the block associated with a for loop enclosed within its own scope?

If so, are new instances of that block created for each iteration of the for loop - and by extension, do they each have their own separate enclosing scope?
>>
>>52705629
For loops are not separate scopes.
>>
File: hmm.jpg (21 KB, 685x325) Image search: [iqdb] [SauceNao] [Google]
hmm.jpg
21 KB, 685x325
>>52705629
>>
noob here. What does JSON, Ajax, etc used for? I'm mainly talking front end. I didn't know there was a use for stuff other and than HTML CSS and JavaScript.
>>
>>52705661
for (var i = 0; i < 5; i++) {
var j = i;
console.log(j);
}


In the example above, you're saying that var j is declared within the scope enclosing the for loop, and not within a separate scope?
>>
>>52705696
Have you tried google? JSON is a data format, Ajax is used to make requests without reloading pages.

>>52705705
Yes, try it yourself.
>>
has anyone published a "front end" to npm? any guidelines for this? includes css, html, js, etc.
>>
>>52705696
>mainly talking front end
>doesn't know about json or ajax
literally how do you survive
>>
>>52705705
it wouldn't be recommended to use that variable out of that loop, but JS does what is called "hoisting", to move all declarations to top of function. it gets more confusing when you have, say, two for loops both using "var i". then you have what is called shadowing. javascript linters will warn you about such things
>>
>>52705781
> it gets more confusing when you have, say, two for loops both using "var i". then you have what is called shadowing.

this is not shadowing.
>>
>>52705822
ya my mistake. i guess it would just be a multiple declaration...since, as stated, all variables in the function scope are hoisted...
>>
JS for loop question:

Each time a loop iterates, does it create an instanced or unique version of functions declared within?

E.g.
for (var i = 0; i < 5; i++) {
setTimeout(someCallback, 1000);
}


In that case, is a new setTimeout being declared each time the loop iterates, each with it's own unique callback instance, and by extension with its own unique callback scope?
>>
File: Capture.png (105 KB, 466x247) Image search: [iqdb] [SauceNao] [Google]
Capture.png
105 KB, 466x247
>>52703890
Added.
This is what I have so far. Still working though.
I'll throw it up on GitHub if anyone wants to use it or contribute (unlikely, lol).
>>
How can I test MVC myself? Is there a live tutorial somewhere?
>>
>>52706252
http://todomvc.com/
>>
>>52706196
reminds me of https://www.google.com/design/spec/components/cards.html
>>
>>52706190
I think you mean closure, and the answer is yes, however not maybe how you think it is (it will not output 1,2,3,4,5 if you tried console.log i).
>>
>>52706278
I'd have sex with you if you were a girl, if you know what I am saying.

Thanks anon.
>>
File: Capture.png (374 KB, 432x532) Image search: [iqdb] [SauceNao] [Google]
Capture.png
374 KB, 432x532
>>52706296
Funny thing is, I designed it to be responsive and on smaller screens it looks a lot like the first image in that link.
>>
I wish I could think of a way to stream my deving without worrying about people stealing my ideas.

I am lacking in self-motivation these days.
>>
>>52706347
What I mean to ask is that if each setTimeout is being called sequentially by the loop, the first setTimeout will not have finished executing before the next one is starting. So although they are both named the same thing, they are not the same thing - there is a separate instace for each setTimeout, each one executing in parallel.

Is that correct?
>>
>>52706397
Should tone down that drop shadow, at least when the viewport is small imo
>>
>>52698095
>the reason people start caring about it is because at a glance it's fast, since its hello world responds fast. But as it turns out, the v8 engine might be relatively fast, but slower than other things
The reason professionals like it isn't because execution speed is particularly great (it's in the same ballpark is just about any of the common interpreted web languages) but because the async model is objectively more performant under heavy load.
>>
>>52706562
Your question isn't really clear to me. What are you are trying to do?
>>
>>52706562
I actually don't know.

A timeout isn't a pause.

Do like
Var x=0;
Function runshit () {
If (x < 5) {
Alert ("doingshit");
X++;
Settimeout (runshit (), 1000);
}}

Wrote this on a cellphone. This is what I always did with js.
>>
>>52706852
>>52706956

It doesn't matter, I've figured out the issue I was having. Parallel function execution is an impossibility in JS, as its single-threaded. I was confusing the async nature of callbacks with parallel function execution.
>>
>>52705629
Only variables declared with let and const are block-scoped. var is function-scoped.
>>
>>52706977
Give an example in web dev where you would need to do that.
>>
>>52706977
I actually wrote a proof of concept that allows you to send a receive messages in Open MPI through Node JS.

Also Node has it's own child process spawner that allows you to open new threads and message between them
>>
>>52707053
In order to prevent the UI from being blocked, it would be nice to have one thread for rendering and another for processing data
>>
>>52707080
That can be done with WebWorkers in most cases.
>>
>>52707053
Why? I don't really give a shit about parallel processing, I was just trying to understand for loops creating instances for functions nested within them.

>>52707059
>node
the ol' vanilla js is single-threaded though
>>
>>52707080
Do you not put your CSS and image preloads at the top or am I not in wdg anymore?
>>
>>52706977
>Parallel function execution is an impossibility in JS
Nope, WebWorkers
>>
>>52707107
But that isnt an actual multithreaded environment.

Callbacks are great and I love the event loop in Javascript, but theres so much power with parallelism

>>52707111
Very true. I was just mentioning it. But ya, the browsers are all single threaded

>>52707157
There's more to UI blocking than preloading vs lazy loading.
>>
>>52707224
>There's more to UI blocking than preloading vs lazy loading.

Could you elaborate on that and how it's an issue?
>>
My school is worthless as crap. I'm probably going to have to find an internship on my own. Are there any resources to find internships for Web dev online that you guys know of?

Or how would I go about finding one?
>>
>>52707399
Google "web design in city, state" and email all of them about an intern position.

Make sure it's paid.
>>
>>52707080
>In order to prevent the UI from being blocked, it would be nice to have one thread for rendering and another for processing data
It can't work on a fundamental level. Like if by "processing data" you mean strictly crunching numbers then ok, you can use webworkers or something but anything which touches the DOM needs to be in the render thread, there's no sane way to manipulate the DOM in parallel.
>>
>>52707483
I agree. That's why I said you parse them out.

Think about browser games. Wouldnt it be nice if you had one thread for the view+controller and one thread for the model?
>>
>>52707437
I just came from an agency (got bored and jumped ship last month though) and they did some job-fair thing for the students up at the uni and we had a bunch of part time "graduate employees" (AKA paid less than people without degrees and student loans) join really quickly one after another. And we had one guy just out of uni walk up to our office front door and ask for a job. I was working late, the only one left in, and told him to come back tomorrow when someone would be around to talk to. Well he actually did and within a week was working with us.

So my advice is to go knock on their door and show them you can make websites and website accessories. It's a really strong job market, I can't imagine you'll struggle to find something.
>>
>>52706616
Thanks for the tip.
>>
>>52707437
Cool man. Thanks.
>>52707529
Thanks to you too.
>>
How do I change the text/value of a div with getelementbyid?

I basically want something like a VB label.
>>
>>52708536
You can do element.text("thetextyouwant") or element.innerHTML("<h3>TheTextYouWant</h3>")
>>
>>52707399

What school?
>>
>>52708638

Shittsburgh University of Plebs
>>
Let's say I study 40 hours a week.

How long would it take for me to learn web dev efficiently enough to get a job?
>>
>>52708853
Half a week
>>
>>52708882
LOL
>>
>>52708853
4 weeks.

Seriously, you need to know such a tiny amount to get to the point where you can start building stuff. I wouldn't even call it studying. You just start building it and figure out how as you go.
>>
>>52708853
A week or two assuming your brain can take 8 hours 5 times a week. Then throw a few months on there to build a portfolio because you will need one.
>>
>>52708566
Neato. Thanks.
>>
>>52708853

You can literally just copy and paste bootstrap templates and call yourself a web dev. It's a cancer though nobody will like you if you do that

Good luck normie
>>
>>52708853

I guess it depends whether you wanna be just frontend or fullstack. Fullstack requires more actual programming skills -- skills that go beyond what a book will teach you and are much more related with experience solving real world problems.
>>
>>52709084
Yeah I want to focus on front-end.
>>
>>52708846

That's a great school I went there. I was taught hello world in JavaScript and HTML tables. I immediately found a job after graduation and have been living the American Dream ever since.
>>
File: responsice.jpg (58 KB, 958x376) Image search: [iqdb] [SauceNao] [Google]
responsice.jpg
58 KB, 958x376
can someone help me out with css?
I'm trying to do a responsive table like pic related, but can't google it up. i know nothing about web development, it if isn't obvious.

I just have a classic table:
<table>
<tr><td></td></tr>
<tr><td></td></tr>
</table>
>>
>>52704113
Guess how I know you don't work in the industry.
>>
>>52709340

This post right after the previous post to this made me laugh

Ditch tables dude. Learn bootstrap.
>>
>>52709367
Well, it is quite obvious.
>>
>>52709418
I really don't give a shit about web development. I'm just writing something for a course and want it to look nice
>>
>>52709340
ditch tables

>>52709418
don't learn bootstrap
>>
>>52709465
change display mode of the tds to block, it should flow into the next row then.
>>
>>52709428
Most times we just need to get things done. Rolling our own solution is not the quickest way to do this. We use frameworks because they are tested, mature, and contain good boilerplate.
>>
>>52709515
>don't learn bootstrap
Why?
>>
>>52709614
I understand that, even if rolling your own well-tuned, performant solution is about as much fun as ridiculing people on /g/ about using frameworks.
>>
>>52708566
>element.innerHTML("<h3>TheTextYouWant</h3>")
This doesn't work, element.innerHTML isn't a method, it's a property. You would use
element.innerHTML = "the text you want";


Also .text is a jquery method, it's not on raw element refs.
>>
>>52709648
because it's trendy to hate on bootstrap.
>>
>>52709340
<div class="wrapper">
<div class="image-container"><img src="http://lorempixel.com/300/200">
</div>
<div class="image-caption">Caption
</div>
</div>
<div class="wrapper">
<div class="image-container"><img src="http://lorempixel.com/300/200">
</div>
<div class="image-caption">Caption
</div>
</div>


.wrapper{
float:left;
}
.image-container{
width:300px;
border:1px solid #000;
margin:1px;
}
.image-caption{
width:300px;
text-align:center;
border:1px solid #000;
margin:1px;
}
>>
>>52709311

Dubs for truth

I went to Shitwarts School of HTML Craft and Faggotry. I was taught flash, dream weaver and wordpress. Got a job updating themes and writing pop up boxes. Life is great.
>>
I'm making a mobile application with Ionic. It includes parsing of third-party websites but I read online that javascript doesn't allow that for security reasons. Is there any way to bypass that?
>>
>>52709755
proxy it through your backend.
>>
>>52709774
I don't really want a backend, I just want to upload the app and be done with it since the app doesn't have a database - it parses multiple websites and compiles them into a single page.
>>
>>52709340
If your content really is a semantic table then breaking it on resolution doesn't make sense. If you actually have a semantic list (an ordered collection of visual elements) then it might, so you should probably use divs like in
>>52709716
>>
>>52709826
then no, you can't.
>>
>>52709340
Look up CSS @media
>>
>>52709691
Document.getelementbyid ("mydiv").textcontent="new text";
>>
>>52709837
It makes me wonder, then how do botnets like Facebook send information to their servers from an embedded Like button in a random blog, for example, if cross-domain requests are not allowed
>>
>>52709931
A site can opt to allow cross-origin requests by setting a specific header on responses. Most sites don't set this header because it opens them up to CSRF attacks. iFrames also get around the cross-origin issue because XHR requests made from within an iframe is considered to have the same origin as the iframe's href. iFrames also have other security measures to make sure that's not a way to bypass CORS illegitimately.
>>
>>52697399
>>52701219
Bumping again
>>
Has anyone here published an npm module yet? Is that hard to do?

I basically just want to keep my Gruntfile clean and make my shit available in several projects.
>>
>>52709755
Browser extensions can bypass CORS. You need that or a server to parse other domains.
>>
>>52710130
>make npm account
>npm publish
>>
>>52710130
I did as part of the book I'm reading. It's not too bad.
>>
>>52710190
No further hoops to jump through? Like having to provide tests and passing jslint or something? Okay.

So I just put in my github repo and done?
>>
What's a good IDE for webdev stuff? I disconnect from my monitor a lot and I'm tired of my windows jumping around. I just want something that can hold multiple terminals, the editor, and a browser preview.
>>
>>52710409
Atom
>>
>>52710473
I thought Atom was a Sublime Text clone. I have Vim but I don't feel like learning it right now. Does it support that stuff?
>>
>>52710409
Not sure about full-blown IDEs, but from what I've heard, Brackets has a pretty decent browser preview.

I personally just use my desktop terminal, Sublime 3, and Browsersync
>>
>>52710485
You can install vim-mode and ex-mode.
>>
>>52710500
I've tried Brackets before. It seemed nice but I wasn't a huge fan of it.

>>52710500
>I personally just use my desktop terminal, Sublime 3, and Browsersync

I also use Sublime 3 and my terminal. Never heard of Browsersync. I'll check it out.
>>
Am I the only one still coding in Notepad.exe?
>>
>>52710895
Install notepad++
>>
>>52710767
Browsersync is great.

real-time browser updates upon file saves. LAN support for developing for multiple devices.
>>
Anyone try treehouse for learning web dev its pretty useful I find it better then code academy
>>
>>52711167
I'm using laracasts atm, but I hear about treehouse all the time so it's probably one of the best.
>>
>>52711167
Codecademy is great if you don't know what an array is, but it's like taking a bunch of CS101 courses in different languages.
>>
File: Selection_002.jpg (27 KB, 878x133) Image search: [iqdb] [SauceNao] [Google]
Selection_002.jpg
27 KB, 878x133
>>52709418
>>52709515
>>52709716
>>52709836
>>52709840
css is fucking retarted
>>
>>52711454

You just dont understand it
>>
File: bruh.jpg (17 KB, 534x300) Image search: [iqdb] [SauceNao] [Google]
bruh.jpg
17 KB, 534x300
I want to smear cum on my web server, will that impact my clients service?
>>
File: Selection_003.png (853 KB, 1232x850) Image search: [iqdb] [SauceNao] [Google]
Selection_003.png
853 KB, 1232x850
>>52711596
ok so the float works, but can I make them float in the center? this gap looks like shit
>>
>>52711454
You wrote it.
>>
>>52711684
<center>
>>
>>52711684

define the width and height of the container and then set

margin: 0 auto;
>>
>>52711774
what?

>>52711788
you mean this "wrapper" thing? the rest of the divs are inside it
>>
>>52711907
forgot pic
>>
>>52711924
Are you 40+?
>>
>>52711924

your code is fucking disgusting; this is what I mean when people say frontend is easy

your best bet is to add a container around your "wrapper", set the width to 100% and margin: 0 auto;
>>
>>52711982
That's how my css looks like lol. How to fix?
>>
>>52712304
>lol
>>>/reddit/
>>
>>52711950
30
>>52711982
I never said it was easy. I said it was retarded

everything is in the .main-image div, if that's what you mean
>>
>>52712325
lol
>>
>be a master in HTML and CSS
>shit at programming

Anyone know this feel?
>>
>>52712358
>lol
>>
Someone make a new bread, this one is deading
>>
Anyone mind pointing out my error here? I wanted to apply the gray color to all the text in my table, then overwrite it with another style making the text in the thead and first tr of the tbody white, but what I tried isn't working.
>>
>>52712342

honestly just post your code on github or codepen and i'll fix it its easier that way or post a pic of the full design and i'll just code it from start
>>
>>52712342
>>52711982
oh I guess this is it. why is this div stopping here? shouldn't it include the wrapper divs?
>>
>>52712410
here
https://kurac org/test/php/crapgal_init/v0.4/index_1.php
>>
>>52712407

why are you applying styles in the universal selector thats your first problem, you should only be using it for resets and shit

replace * with body

and use flat selectors; give everything a class name and just target it directly

css reads from right to left so you're literally making it read almost the entire page for no reason
>>
>>52712473
>replace * with body
Thanks for that.
>give everything a class name
Our instructor specifically told us that we weren't allowed to use classes or IDs for this assignment. She also tries to steer us away from using too many classes, as she finds that beginners quickly start to abuse them, which is inefficient.
>>
>>52712552
Well that's some shitty advice, in this case if you wanted all tables to look alike you could add a .table class and style that.
>>
>>52712455


<!DOCTYPE html>
<html>
<head>
<title>crapgaltest</title>
<link rel="stylesheet" type="text/css" href="css.css">
</head>
<body>
<script src="//code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript" language="JavaScript">
function set_body_height() {
$('body').height($(window).height());
}
$(document).ready(function() {
$(window).bind('resize', set_body_height);
set_body_height();
});
</script>
<h1>crap of the day</h1>
<img src="//kurac.org/test/php/crapgal_init/v0.4/content/italian-landscape-mountains-nature.jpg" class="centerImage fit">
<section class="min-container">
<div class="wrapper">
<div class="image-container"><img src="//kurac.org/test/php/crapgal_init/v0.4/content/thumbs/italian-landscape-mountains-nature.jpg"></div>
<div class="image-caption">italian-lands...></div>
</div>
<div class="wrapper">
<div class="image-container"><img src="//kurac.org/test/php/crapgal_init/v0.4/content/thumbs/1315653424600.jpg"></div>
<div class="image-caption">1315653424600></div>
</div>
<div class="wrapper">
<div class="image-container"><img src="//kurac.org/test/php/crapgal_init/v0.4/content/thumbs/screenshot_007.jpeg"></div>
<div class="image-caption">screenshot_00...></div>
</div>
<div class="wrapper">
<div class="image-container"><img src="//kurac.org/test/php/crapgal_init/v0.4/content/thumbs/sandra1tk20.jpg"></div>
<div class="image-caption">sandra1tk20></div>
</div>
<div class="wrapper">
<div class="image-container"><img src="//kurac.org/test/php/crapgal_init/v0.4/content/thumbs/reggiedog.jpg"></div>
<div class="image-caption">reggiedog></div>
</div>
</section>
</pre>
</body>
</html>


edit your css

.min-container {
width: 80%;
margin: 0 auto;
}


edit the width to whatever you want it, and you'll have to update the large image selector because i removed the useless container it was wrapped in.
>>
>>52712552

cont...

>>52712552

Your instructor is a dumb cunt, there is absolutely nothing "inefficient" about classes, whats inefficient is using non flat selectors.

.class {

}

>jit automatically searches for .class class

vs.

nav ul li a {

}

>reads right to left
>searches for every a tag, then every li tag that has an a child, than every ul tag that has an li tag, than every ul....


>>52712643

forgot to mention you shouldn't float it left, that's a half assed way of doing it. by default div's are block level elements, instead of floating them just set display: inline-block; and define the width of the container.
>>
>>52712665

>forgot to mention you shouldn't float it left, that's a half assed way of doing it. by default div's are block level elements, instead of floating them just set display: inline-block; and define the width of the container.

that's a long way to say:

replace

float: left

with display:inline-block

in the .wrapper selector
Thread replies: 349
Thread images: 26
Thread DB ID: 478528



[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y] [Search | Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.