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

/wdg/ Web Development General

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 315
Thread images: 47

File: 1496845010511.png (731KB, 824x553px) Image search: [Google]
1496845010511.png
731KB, 824x553px
wet dreams general

>old thread
>>60976759

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

>Getting started
Get a good understanding of HTML, CSS and JavaScript.
Everything you learn will have these as their base.
The Mozilla Developer Network offers a good intro (no matter your browser choice)
https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web

>Online courses
https://www.codecademy.com/
https://www.freecodecamp.com/
https://www.bento.io/

>Further reading/viewing
https://www.youtube.com/watch?v=sBzRwzY7G-k
https://github.com/kamranahmedse/developer-roadmap
https://github.com/getify/You-Dont-Know-JS
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md

>Code challenges
https://www.codewars.com/
https://www.hackerrank.com/
https://codefights.com/

>Useful resources
https://developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
https://libraries.io/ - Discover and keep track of open source libraries, modules and frameworks
https://stackoverflow.com/ - Developers asking questions and helping each other
http://www.programmableweb.com/ - List of public APIs
https://caniuse.com/ - Check browser support for front-end web technologies

>Useful Youtube channels
https://www.youtube.com/derekbanas
https://www.youtube.com/learncodeacademy - codecademy
https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
https://www.youtube.com/user/TechGuyWeb - Traversy Media
https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp
https://www.youtube.com/user/shiffman - coding train

>cheap VPS hosting in most western locations
https://www.digitalocean.com/
https://www.vultr.com/
https://www.linode.com/
https://www.scaleway.com/
https://www.heroku.com/

an in-depth comparison of hosts
https://www.webstack.de/blog/e/cloud-hosting-provider-comparison-2017/
>>
First for PHP
>>
roast my website
https://freelancesharp.com
>>
First for React
>>
array[1] for Lua
>>
>>61015140
>>61015050
nice domain
guess it's exclusively for C# jobs?

But really, why wordpress
Also better make it responsive.
>>
>>61015263
yeah, I'm planning to make this one C# only and IP range ban 3rd world countries to keep only decent programmers in.

Wordpress because I need to learn it for some webdev jobs sadly, I'd love to work on Laravel, pure PHP, express.js or ASP.NET MVC

it has support for bitcoin payments now and its anonymous so thats nice, i can use it to hype it up

i'll surely make it responsive once i learn angular
>>
>>61015140
Don't make your wordpress admin username 'admin'.

It's super easy to guess, and people will be able to execute password attacks pretty easily.

In any case, you should disable the thing that confirms that the user exists, and instead just use a generic "error: login failed"
>>
>>61015389
Im not worried about the password being cracked, its quite complex

I'll change the login page to an AJAX login modal later on
>>
File: Screenshot_20170621-190124.png (127KB, 720x1280px) Image search: [Google]
Screenshot_20170621-190124.png
127KB, 720x1280px
mobile looks like shit faggot

put table in frame or something
>>
>>61015549
you are the only person from the ones that tested my site on mobile that experiences the shrinking of the navbar, get a better browser
>>
>>61015549
it's chrome dev it should work or you did something wronh
>>
File: image.png (28KB, 592x771px) Image search: [Google]
image.png
28KB, 592x771px
>>61015611
you r dumb...
>>
File: Capture.png (4MB, 3840x2045px) Image search: [Google]
Capture.png
4MB, 3840x2045px
Working on something.

Pls dont bully its very very early
>>
>>61015709
Needs more shadow on the boxes
>>
>>61015611
Not him, but I just tested on Android Chrome and Firefox, and it's not that the navbar shrinks, it's that everything else expands to the right of the navbar, thereby expanding the page.

Once you zoom out (which everyone naturally will when they realize they can't see anything) it looks like the screenshots others provided.

Maybe make each table row overflow-x scrollable?
>>
>>61011250
>stupid to make a nice looking website without piling on tons of unnecessary node shit?
Node isn't front end, it's a javascript back end framework. Plenty of us use C# and Java instead because we're stupid enough to need backends when we're stupid enough to need permanent data.

>After setting up webpack, bundler, npm and a host of other shit you've already spent more time and work than it would've taken to just implement the feature
I reimplemented webpack by reloading scripts every 500ms and bundler is a cancerous concept, NPM too kind of. Get your own damn scripts.

I actually think it's about equivalent if you're a skilled developer. Installing shit is the SAME difficulty for everyone regardless of intelligence or skill but reimplementing everything is surprisingly easy if you know what you're doing.

Shit like webpack/yarn/gulp/bundler/etc is actually hard to install and most these things turn out to be under 10 lines of C# code.

>>61014123
Pure /wdg/ is svg. That way it works identically in all resolutions and is a fraction the file size. Understanding you're not perfect, a 16-24bit png is fine too.

>>61014684
Web dev can be simple, there's Javascript and another language, the other language you use when you realise storing things on the client's computer isn't a good idea.

Theoretically Java can do everything C# can do, although a lot of developers would prefer one over the other.

>>61015090
>PHP
Shit. Outdated. Slow.

>>61015180
>React
The dystopian C++ of Javascript.

>>61015263
>>61015356
>C#
>Wordpress
>love to work on .. ASP.NET MVC
What are you doing? Write that on your website

C# is lovely but any framework written by a team larger than 10 people will almost always be shit. ASP.NET MVC still gives me PTSD, there are a lot of horrible ideas that were used.

Also, your site takes a little long to load. It's not entirely convincing.

>>61015709
Nice background.
>>
>>61015762
i'll switch to ASP.NET, Node or raw PHP soon, I'm doing this for WP practice because clients are too retarded to use another backend
>>
File: 1497977311656.png (4KB, 400x400px) Image search: [Google]
1497977311656.png
4KB, 400x400px
other frameworks, are you even trying?
>>
>>61015786
Like ASP.NET web api? Maybe. If you already have a lot of Javascript written Node is a better idea, I actually reimplemented node too but not because it's hard to install,I was already working out of C# and realised injecting data into HTML (so you have SEO or what not) is best done in a language designed to do that, like Javascript. Ultimately all I did was make a transform code function, render html function and the library I used already had execute/get/set functions.

People use WP for a CMS, people need a CMS who can't manage data with a back end or set up a database and link it through their front facing server. People who know how to write a back end probably wouldn't want to use WP and anyone paying for code would know that. It's actually a good idea if it's a website on your resume though and you're still applying to the online Spoletini spaghetti delivery business.

BTW, I actually like react, it's just disturbing
return (<div>This is not natural</div>)


My current stack I'm building is C#, v8 (vroomjs), React.

I wouldn't use a CMS, I'd build things with components and backend data, probably from a file unless money is involved. I can't see any need to waste memory for a database for my resume website.

>>61015917
It's nice, it was just developed before its best features were added. IIRC, server side rendering was not an intended feature.
>>
>>61016047
before this I was mainly working with CodeIgniter and Laravel, most of my clients are intimidated by something like a backend thats different than wordpress (they literally say its too complicated lmao) one unfateful thing in life is that dumb people inherit money / get lucky and you have to do this shit for them, I'd be glad to work in any other system though

I like the idea of a front-end that has all the logic and only calls to the back-end for data, it just seems much cleaner that way.

Would you recommend react over angular? Right now I know no framework other than jquery
>>
>>61016131
>most of my clients are intimidated by something like a backend thats different than wordpress
I've seen this business model before and it's beyond me, why are you letting your clients do any of the design? Tell them you'll do it and that's why they pay you.

>I like the idea of a front-end that has all the logic and only calls to the back-end for data, it just seems much cleaner that way.
Which is sweet until you realise no data from the back end is showing up in google searches and it turns out you need that.

>Would you recommend react over angular? Right now I know no framework other than jquery
jQuery isn''t a framework like react or angular, you still use it especially for react which only has one way binding, you then have to use jquery for the other way which really isn't a problem.

I don't use angular, but I've seen a little of it and I have some issues. For starters, it's a framework reforming from the navigation breaking idea of the SPA which even when you're developing these things you'll forget and eventually navigate backwards or forwards.

React is nice, but it changes too much, like C++:
function functionClick() { alert("Clicked!");}
class Greeting extends React.Component {
if(!this.props.name)
this.props.name = "Norbert"; //I don't actually think you can do this, but it demonstrates some things
render() {
return <div onClick{functionClick}>Hello, {this.props.name}</div >;
}
}

Like jQuery, it gives you a means of applying click handlers to things and it gives you one way binding, from your javascript code to your UI where it's really not hard to use jQuery to go the other way when you need to. Something like Vue: >>61015917 does it both ways, two way binding.
>>
>>61015762
PHP 7 is faster than Ruby and other languages. If speed is one of you main concerns, then we should all learn assembly.
>>
>>61016047

>I actually reimplemented node

What does that even mean?
>>
>>61016047
> My current stack I'm building is C#, v8 (vroomjs), React.

can you tell me more, i know a bit of c# but how is your stack set up / how do you start it out, sounds interesting
>>
>>61016330
>I've seen this business model before and it's beyond me, why are you letting your clients do any of the design? Tell them you'll do it and that's why they pay you.

they refuse to give you the job until you do things exactly as they tell you (wont let you choose technologies) like Wordpress since they're used to it and are afraid of learning anything else. I think they want to pretend they know more than us or something, not sure


>I like the idea of a front-end that has all the logic and only calls to the back-end for data, it just seems much cleaner that way.
could just use a back-end language with some preliminary data to feed the search engine then leave anything dynamic to js

I always liked the concept of two way binding, which framework is most intuitive with it? React looks nice
>>
>>61016360
PHP and Ruby are both slow languages and "other" languages are all shit and slow and shit.

>then we should all learn assembly.
Facetious... https://2ton.com.au/rwasa/

Most people accept that for web not even C or C++ is worth it and try to find a moderate middle point between real time fine tuned optimised byte code and a language that needed to wait a few versions before it had a sane typing system.

C# and Java are both shining examples here.

>If speed is one of you main concerns
Speed has an acceptable level, it's not a concern there's simply a cut off. If you're talking on the phone with someone on the other side of the world, you're going to notice and it's going to shit you. The acceptable delay here is about 200ms.

Websites are worse, it's noticeable and has an "unresponsive" feel when a website does not respond faster than 20ms. People want to feel something that's snappy. This is impossible if you're on the other side of the world, but if your actual backend takes single digit milliseconds the difference is not noticeable.

>>61016442
I used vroomjs to load and run scripts.

At the moment I have it set up for reactjs and vue and a library-less replacement for vue, I'm procrastinating about testing the actual vue part because I've never used it. I'd prefer the unholiness that is react.

>>61016480
It's cached serverside rendered react, I have vroomjs running scripts (hotloaded every 500ms) and checking props (and script hashcodes) to determine if it's a good idea to get a fresh render from the engine. Ideally everyone's system here should be the same, so any props input should have a html output mapable between the two. This should make things easy to cache simply by the props and hotloading.

>>61016528
>with some preliminary data to feed the search engine
But then you don't even need to go to the backend! It's a tricky problem, but the answer is back end data has to be injected before responding to requests, so we server side render.
>>
>>61016601
>But then you don't even need to go to the backend! It's a tricky problem, but the answer is back end data has to be injected before responding to requests, so we server side render.
I miss the years pre 2014 when you could just whip something up with php jquery html js, this shit is getting too bloated and redundant
>>
>>61016651
But PHP is abhorrent.

It was "the" old solution, it's what word press has a hard dependency on, it's why word press is shit and it's slow at a time where you only want fast code or really well cached code running. Cached C# code is just obsessively excellent. PHP instead runs a bunch of slow code between requests that's designed to be injected into HTML forcing you to mix code, which admittedly react skirts with.

Bloat is when there's features or boilerplate in your way that introduces common or frequent bugs and errors, this is inevitable if the framework introduces new syntax:
  <button v-on:click="counter += 1">Add 1</button>
but not really true if the syntax is understandable and expectable. In this example, why did the api designers choose the character v? Why is there a full colon between on and click? What kind of scope is running in that string? These are all questions that make people with actual experience understandably a little uncomfortable, especially the scope question. If you're questioning a framework like this, it's likely it'll get in your way rather than help you out.

Only someone with a VERY questionable design style could ever unironically recommend PHP.
>>
>>61015917
You mean angluarjs 1.x doppelgänger?
>>
>>61016759
The old "muh php" meme. There is literally nothing wrong with php if you're not a retard.
>>
>>61015709
Looks like a really good start
>>
>>61016884
Fractal of bad design.
>>
>>61016759
>Only someone with a VERY questionable design style could ever unironically recommend PHP.
>Only someone with a VERY questionable design style could ever unironically recommend being marketable
>>
>>61017025
You are simply not right if you think PHP is more impressive than C# or Java on a resume. You are simply not a skilled web developer if you think PHP is any more or less than that.
>>
>>61017051
Alright I'm sold, you
Now recommend me a book about c# webdev senpai, I can into C/C++
>>
>>61015140
also, scrub your inputs for logins man,
Sql scrub
>>
I'm working on campus this summer, but I literally work from home and don't do anything but fap and play video games. What else can I do to make money in the meantime? Not really interested in freelance work unless I can make ~$100 bucks a week.
>>
>>61017092
I tried to get you a link to effective C# 6.0 which is exactly the best thing for you to become godly in C# if you actually do actually know C/C++ but failed. Internet piracy is not what it used to be.

If you want a C# library that's relatively simple and comes with serverside rendering set up, you may use mine if you so please:
https://www.nuget.org/packages/FAP.React/

I'm about the release new features though, like vue and an even more minimalist way to run javascript. Regardless, it's simple enough to that you could learn C# whilst debugging with a browser, the whole point is that you can do all the dirty backend business in as few lines of code as possible.

>>61017138
Oh, haha, oh dear.

>not handling this at the backend after hashing everything in the odd case of sniffers
>>
I've got an idea for a website and I need to know how difficult it would be to incorporate. Maybe I can learn how to do it myself, maybe not.

The website has categories, each category has a few fields that people can fill out to submit an entry, and then later people can rate the entries. I'd probably need a way for people to create accounts, since people don't work for free and the prospect of internet points is appealing to people, which would entice them to make submissions.

How difficult would it be to make sure the site is secured, to structure the site and create the database of submissions, ensure that people don't do sql injections and hack my mom's dialysis machine, etc? Any advice on this would be greatly appreciated. What would I expect to pay if I were to hire someone to do this for me, if it would be too difficult or time consuming to learn the programming to do it myself?
>>
>>61019492
Sounds like reddit.
>>
>>61019696
nothing that massive, nothing that complex
>>
>>61019492
No site is 100% secure. Just don't do anything stupid like doing security checks in javascript.

Not really sure what you're looking for by your description, but you may want to take time writing up requirements for every little piece of your website. That would help gauge the cost. However, webdevs will definitely overcharge you if you admit your ignorance. I would charge no less than $25 per hour. I make way more than that as a professional dev.
>>
>>61019766
Thank you for the thorough reply. I do appreciate it.
>>
>>61019873
No problem. To answer your specific questions:

>people don't do sql injections
Sanitize inputs and don't let inputs be part of the construction of any embedded queries. In my time programming, I've never seen anything vulnerable to an injection. If someone ends up doing that these days, they are poor programmers.

>hack my mom's dialysis machine, etc
I assume this is a joke, but don't serve your website from your home network

>if it would be too difficult or time consuming to learn the programming to do it myself?
web dev is actually is one of the more rewarding types of programming since you can see your results a lot sooner as long as you are a full stack(working on the backend and frontend stuff) developer. I wouldn't pay to make my own website. There are way too many frameworks out there that make it really easy like angular and python + flask.
>>
>>61015424

thanks mang, really needed and, didn't know where to start!
>>
>>61020051
Not that guy, but when in doubt, open up the dev tools, and see what's happening under the hood. Especially look for JS files that look like they might be libraries, and google them.
>>
>>61020156
another good point, thanks!
>>
File: varg-vikernes.jpg (114KB, 762x464px) Image search: [Google]
varg-vikernes.jpg
114KB, 762x464px
Stop making another shitty dating app or forum site
>>
What's the best way to learn css?
>>
>>61020996
Well, the issue with CSS is that it is, in and of itself, pretty easy to learn. It's a pretty stereotypical "easy to learn, hard to master" type thing. One way I've heard to learn it easily is to try to duplicate stuff - your favorite website, a logo, whatever - with pure css WITHOUT looking at their code.
>>
1. say I want to display data in a table and make it editable so that changes to cells are propagated to the db right away. What are my options besides throwing a bunch of JS onclick handlers with ajax at the problem?

I'm using jquery/datatables btw, but open to suggestions

2. Is there a simplified bootstrap.css containing only the styling without the grid part or similar? I use flexbox and would cut some fat, and bootstrap 4 looks a bit retarded
>>
File: 1488789542764.jpg (27KB, 253x364px) Image search: [Google]
1488789542764.jpg
27KB, 253x364px
I had a phone call from a job I applied for. Failed the Javascript screening questions (definitions for inheritance, closure, promise, propagation). Been FE dev for 2 years but don't work with JS much and never had formal JS education.

What's a good guide for someone like me?
>>
>>61022942
https://en.wikipedia.org/wiki/Suicide_methods
>>
>>61022994
This isn't the edgy advice I came here for.
>>
>>61023067
Read the fucking OP you retard.
>>
File: csshelp.png (102KB, 1919x302px) Image search: [Google]
csshelp.png
102KB, 1919x302px
How do I get the background of the sections out of the figure's position? The text wraps around the figure element but the backgrounds don't.

https://jsfiddle.net/obqhwkjd/1/
>>
>>61021926
> 1)
>bunch of JS onclick handlers with ajax
implement it with Vue or React and then pretty much that on the editable component
> 2)
with most css frameworks you can pick and choose, what you use, when you include the parts from their sass source.

>>61019766
>Just don't do anything stupid like doing security checks in javascript.
Rather don't trust the client to properly check the data.
You can verify user input with JS as long as it's done on the server.
>>
>>61023505
that?
https://jsfiddle.net/obqhwkjd/4/
>>
>>61023594
Thanks for the help but I have just figured it out. 'overflow: hidden' declaration on the 'section' selector.
>>
File: csshelp.png (75KB, 872x321px) Image search: [Google]
csshelp.png
75KB, 872x321px
>>61023505
Does anybody know how to horizontally align <figure> elements? I'd like it to be positioned in the center of the black box.

Here are the properties for aside, which it is enclosed in:

aside {
float: left;
clear: both;
display: inline-block;
margin: 0 auto;
background-color: #000;
padding-right: 0px;
}


The figure element has no CSS applied to it.

The only way I have found to do it is through the dirty and archaic way of enclosing the element in <center> tags.
>>
>>61023806
Solved it myself again.

figure {
margin-right: 0px;
}


I will stop asking questions from now on /wdg/.
>>
File: SFR7puf.jpg (77KB, 500x1127px) Image search: [Google]
SFR7puf.jpg
77KB, 500x1127px
everyone should learn flexbox

http://flexboxfroggy.com/
https://www.youtube.com/watch?v=Mkza0N8NiK4
https://codepen.io/Ampix0/pen/qmxqNL

everyone should know their CSS selectors

https://flukeout.github.io/
>>
>>61023942
>https://flukeout.github.io/
oh shit looks broken on FF (nightly), just use chrome for that one
>>
>>61019492
it will be time consuming and probably not work out on your first try

if it is a good idea and you have already contacted customers / sold the product / raised capital, most goys will do it for equity (including me)
depending on the complexity 1k-10k and 1w-1month

however consider off the shelf products as well, you might can get away with installing WP on a VPS for 10 bucks and some googling for plugins

>off captcha is ridiculous at this point
>>
WHY IS CSS SUCH A PAIN IN THE ASS
>>
>>61024095
>>61020010
thanks again for this info
>>
is freecodecamp any good? I wish there was just a book to learn everything..
>>
>>61023942
I find flexbox almost useless now that we have grid layout.
>>
File: 1498082370602.png (301KB, 800x1065px) Image search: [Google]
1498082370602.png
301KB, 800x1065px
Can someone post the front-end learning roadmap?
>>
>>61026733
https://github.com/kamranahmedse/developer-roadmap
>>
What is the best option for c# learning setup? win servers are expensive
>>
>>61015075
So I have a dumb question, if nodes purpose is for package management and file serving. Say I we're to host a web app using AWS, isn't S3 and Route now serving files? Where would node fall into that stack? Or would it not be necessary at all if you're not working with something like a virtual DOM?
>>
>>61027326
AWS Route 53 is just DNS. It translates a domain name to an IP address; not much more than that. You cannot run any custom code with just Route 53.

S3 is a static file server. You can store data on there, such as images or JavaScript libraries that will be loaded by the client, then put links to that content into your HTML or whatever. You cannot run any custom code with just S3.

AWS EC2 and Elastic Beanstalk are both services that let you run custom code, essentially like on a server. If you want to run Node.js (or any custom code), you probably want one of those. If you need a lot of files to be served to clients, then you should use S3 in conjunction with one of those. Route 53 is good and easy to integrate if you just want to go full AWS hosting stack.

This link is a good explanation of most AWS products:
https://www.expeditedssl.com/aws-in-plain-english
>>
>>61015075

has anyone ever used this Stripe shit?
>>
>>61027921
Neat, thanks for explaining!
>>
Hey guys I hope someone can help me with a little problem.

I got two mongodb collections and need to do two finds and then show stuff from both of the collection in my pug/jade file.

here is the code kinda

router.post(bla bla function(req,res,next{
collection1.findstuff( function(stuff1){
collection2.findstuff(function(stuff2)
{
res.render('...', data: stuff1, data2:stuff2);
});
});
});

without the 2nd collection my pug file was just

each item in data
tr
td #{data.something}

etc.

How can I do this each item in data now with two collections?


hope you can help me and sorry for shitty formatting.
>>
Going to be focusing my computer science degree in networking. Is asp.net something I should learn? It appears useful to at least know
>>
>>61027326
>if nodes purpose is for package management and file serving
Nodes purpose is to let you run JavaScript on a server (as your backend for example)
NPM is the program, that comes with node, that lets you manage your project dependencies (both front- and back-end)

Node "can" serve files, but that's just part of what any backend can do.
>>
>>61026816
Local machine. You can later run your creations in Linux machine using mono or natively when using core.
>>
>>61028072
Don't know what programming has to do with networking but c# is good language to learn. Aim for asp.net core or at least MVC not webforms or old asp.
>>
In React when you are rendering the final component, what's the best way to update the props on that? For example I'm rendering my app this way (on my index.js file):

ReactDOM.render(<App source="https://example.api.url/api"/>, document.getElementById('root'));


And I want to update the source to another URL when I click on a button, how would you go about doing this?
>>
Lets make a stack overflow replacement that isnt ruined by the nazi modding.

It should be:
-anonymous
-points only visible to yourself

what else
>>
>>61028810

I don't have much experience with react, that being said my newb assessment leads me to think you can solve this by updating the state of the source props using an onClick event.
>>
>>61028810
why isn't that a state inside the App component?

>>61029654
muh internetpoints obviously
>>
>>61029654
I think you need relatively strong modding, to keep out the "do my homework for me" questions, and the "what's the best choice to do X" subjective questions, and the "how do I make my own AI" extremely broad questions.

Because that's what I see on Quora, and that's largely unmoderated to those types of questions.
>>
>>61029764
>>61030090

Got it, so instead of passing it directly into the component I should put the URL's as states in the component for easy change when clicking the button. Thanks lads.
>>
>>61015075
>desktop broke
>pick up the old laptop I had laying around
>it's 1024x768
>everything looks fucked because i'm too lazy to build a mobile version

just my blog
>>
>>61015709
i like it anon
what did you use to make it?
t. absolute fucking pleb
>>
How do I choose colors for my website? I suck at graphic design.
>>
Anyone good at CSS and want to make some crazy animated shit?
>>
>>61031263
MONOCHROMATIC SCHEME + MINIMALISM
It's easy breh
>>
File: PhilFish-610.jpg (140KB, 610x345px) Image search: [Google]
PhilFish-610.jpg
140KB, 610x345px
Quick, Angular or React?!
>>
>>61031708
Vue
>>
>>61031757
It's a meme bro
>>
>>61031458
What kind of crazy animated shit?

I made this with pure css animation:
palossand.com
>>
If I wanted to make a simple SPA page with ~10 subpages, would it be good to make one without a framework? I can just make my own router and do the good old hide and show divs for the actual pages when the user clicks a button.
>>
just a general motivational video, watch this shit and change your fucking habits!!!
>https://www.youtube.com/watch?v=nllZrOoxpzc

For all of you NEETs out there (myself included), get your ass off the couch, turn off your TV and get to fucking studying. And don't forget your morning shower.

I've been doing a minimum of 5hrs of coding for the past two weeks, maybe more. Get your shit together guys, we can do this.
>>
>>61032144
Shut up wageslave.
>>
File: 1497037152363.png (280KB, 641x530px) Image search: [Google]
1497037152363.png
280KB, 641x530px
>>61032144
>don't buy things, when they are on sale
what?
>poor people don't have money saved
holy shit sherlock

wow i am a true Aluxerâ„¢ now
>>
>>61032283
they don't say 'dont buy things on sale', they say 'dont buy clothes on sale', which basically means, dont dress like a pleb if you dont wanna be a pleb. Not sure I agree with it, but at least get it right before you criticize it
>>
File: icouldhavesavedmore.png (88KB, 1882x987px) Image search: [Google]
icouldhavesavedmore.png
88KB, 1882x987px
Node pleb here again with two questions.

Once I post the data, the form doesn't get served again when refreshed and the data just posts the same info into the console again. If I want to post the data then start up a new form where would I start?

Also, would it be easier to post the data into a JSON file or try to set up something with mySQL or mongoDB?
>>
File: 1444615393629.jpg (35KB, 720x1280px) Image search: [Google]
1444615393629.jpg
35KB, 720x1280px
Why gives a fuck about muh "flat design"? Why do we even care about round fuckin twitter pictures?

There's a thread on /r9k/ with the most comfy minimalist theme.

https://diogn.es/about
>>
File: donaldduck.jpg (44KB, 433x572px) Image search: [Google]
donaldduck.jpg
44KB, 433x572px
>>61032433
No js, no css

Perfectly responsive
>>
File: products.jpg (19KB, 754x87px) Image search: [Google]
products.jpg
19KB, 754x87px
>>61032426
>but at least get it right
pic

anyway, clothes and "fashion" is a pretty retarded area to waste your money on.
Sure don't buy the cheapest shit, because it will get fucked in no time, but that applies to literally everything. Nothing to do with things being a certain % off their regular price.
>>
>>61032433
This website convinced me to never use CSS ever again.
>>
>tfw 1 Patron.
>>
>>61032433
sounds like an excuse

even if you are lazy, today you can just load up bootstrap, foundation or bulma and let it do the work for you.
>>
>>61015709
Is that Polymer? I worked with that shit and it was _horrendous_
>>
File: 1781835[1].png (64KB, 400x400px) Image search: [Google]
1781835[1].png
64KB, 400x400px
RequireJS Yay or Nay?
>>
>>61032828
Really no reason not to use webpack right now, until something better comes along again.
>>
>>61032980
So what you're saying is that instead of loading required modules separately when every they are needed its better to load everything in one giant file at page load?
>>
>>61031779
All frontend frameworks are memes.
>>
>>61033028
you can still lazy load modules with webpack

Sorry I am actually not really familiar with RequireJS.
Just thinking, that it would make your code better maintainable in the long run (if there is such a thing with JS), since a lot of other things are also using webpack with its plugin/loader system.
With Require you are more likely to be on your own with everything I assume.
>>
>>61033028
Of course it is. One big network request is an order of magnitude faster than many small network requests. Even if you're using requirejs, you should have a build step which can create layer files.
>>
>>61033895
>One big network request is an order of magnitude faster than many small network requests.

Generally, yes, but it might be better user experience in some cases to load the basics first, then load other stuff, especially if the files are large. You want first paint as soon as possible, which means prioritizing above the fold content.

Also, if you really care about performance, read up on TCP slow start.
>>
>>61034219
Which is why I said layer files.
>>
File: wqer.png (7KB, 410x60px) Image search: [Google]
wqer.png
7KB, 410x60px
I'm developing a web app I hope millions of people end up using. Do you think the fact that the internal filenames of user uploads are the same exact format of 4chan's will attract trolls at all? Am I just being paranoid?

# Generate "random" filename
my $basename = $time . sprintf("%03d", int(rand(1000)));
my $filename = "$basename.$ext";
>>
File: lol.jpg (44KB, 481x600px) Image search: [Google]
lol.jpg
44KB, 481x600px
Who here has used Stripe.com's payment system?

I need to know if anybody uses it on websites.

I can't find any references to Stripe in any of the sources on their listed customers' webpages nor any communication with Stripe.com in any HTTP traffic
>>
>>61034806

4chan file names are unix time stamps not random
>>
>>61034897
I know that stripe is pretty popular and that they do good work.
>>
>>61034977

do you know of one example of a website that actually uses it?
>>
>>61034897
They probably only load the API when you actually go to pay for something/are on the payments page.
>>
>>61035027
No, I haven't worked in e-commerce in a long time.

You understand that not seeing any references to stripe in network requests or frontend JS source has absolutely no bearing on whether or not a site actually uses stripe, right? Are you implying that stripe are just lying about their clients or something?

https://github.com/stripe/stripe-ruby
https://github.com/stripe/stripe-php
https://github.com/jaymedavis/stripe.net

None of these would show up in either of those places, and based on the number of followers I think it's safe to say they're being used.
>>
>>61034806
Holy shit is that Perl? A blast from the past!
>>
>>61022942
>'FE dev'
>doesn't know what inheritance, closure, promises are

Bro, at BEST you're a designer. This is like saying "I'm a car mechanic, but I don't know how to change a flat!".
>>
>>61034912
The last 3 digits are random
>>
File: hw.jpg (127KB, 650x650px) Image search: [Google]
hw.jpg
127KB, 650x650px
>>61026733
Here you go
>>
>>61035076
It is. Perl is still great and has adapted well to modern web dev, no joke
>>
>>61035127
In my experience (I lead tech at my startup and do a lot of hiring), "front-end developer" is code for somebody who can do html/css breakouts satisfactorily, and copies and pastes from jquery tutorials for any actual front-end behavior. They're not programmers or engineers. I also think that there's significant value in separating the titles as such, because a "front-end developer" in the capacity I've described is still very valuable to a lot of shops, they just have a very different role from a web applications engineer. "Developer" != "programmer" as far as I'm concerned.
>>
>>61035127
>>61035203
Additionally, calling him a "designer" is retarded. Anybody who devalues designers in this way has no fucking clue what they're talking about.
>>
>>61035075

We are trying to make it so you can use Stripe.com's system without running non-free javascript and its very very very important

Can it even be done?
>>
>>61028046
Firstly, use the [ code ] tags. They make stuff on this board much easier to read both for you and for us.
Secondly, as far as your question, I'm not 100% sure what you mean. I assume you mean, given two sets of data - say, US states and flavors of ice cream - you wanna render two separate tables? Or do you want to render a table with something like "state: NY", and then render, in this example, that state's favorite icecream?.

Sorry if this question's a little weird, but otherwise I'm not 100% sure why you couldn't just do:

each item in data
tr
td item

each item2 in data2
tr
td item2


Then again, I've not used pug/jade, so this may be entirely wrong!
>>
File: GoodbyeWorld.png (155KB, 272x729px) Image search: [Google]
GoodbyeWorld.png
155KB, 272x729px
Why are you guys doing web development and not mobile app development? Honest question, by the way. I am trying to evaluate if it is worth switching to mobile.
>>
>>61031263
#f00 on #0f0
>>
>>61031263
Literally just bing it.
https://coolors.co/
>>
>>61031905
>I made this with pure css animation:
>Basically a gif on a relatively unstyled BG.
>>
>>61035214
Yeh, you're right. Sorry. I thought that was a stupid thing to say right after I wrote it.
>>
>>61035274
>Can it even be done?
Literally all three libs I linked. Are you retarded or something?
>>
>>61035214
And to clarify (me --> >>61035382 ), I only said 'designer' because I assumed he might still be able to actually do SOMEthing. Not that designers are somehow lesser. Hell, I have zero artistic ability, so I'm envious of anyone who can actually design an attractive UI.
>>
File: ok.png (6KB, 233x142px) Image search: [Google]
ok.png
6KB, 233x142px
wtf how do i do this
>>
>>61035399

I don't honestly know what ruby is.

I'll admit I don't know what I'm doing. Fuck me for trying, etc.. I just need to know if it's a client side library or not from somebody who does.
>>
File: doc.jpg (346KB, 2052x1368px) Image search: [Google]
doc.jpg
346KB, 2052x1368px
>>61035426
>>
>>61035450
All of those are purely back-end libraries. Ruby, php, .net.
>>
>>61035426
Nobody actually gives a shit about the number of years, just apply. It's supposed to give you a general idea of the level of experience, in a low-medium-high kind of way, not be literally true (retarded, I know).
>>
>>61035327
Not the gif, that's just a tiled background. The CSS animation I'm talking about is flashing synced to music; you have to wait a few seconds for it to start. (Also turn on sound.)
>>
>>61035426
job requirements are bullshit a lot of times (wouldn't know the percentage, but it's significant). Just apply if you're anywhere close, and anywhere being 25% capable of doing all the shit they want. Truth is, a lot of times they're desperate and will take anybody. At least that's how it is in the US.

>https://www.youtube.com/watch?v=1hzEpRoMGD0
>https://www.youtube.com/watch?v=6G3kQyqMFpQ
>>
>>61035426
this one also is exactly the answer you're looking for
>https://www.youtube.com/watch?v=VBG4XERP2lo
>>
What's all this about webpack? I've been using browserify.
>>
>>61035303
I don't use mobile apps so I have no interest in making them
>>
>>61035303
Seems really involved
>>
>>61035303
I've done some of both. I like the fact that I can develop once, and it's totally cross platform. Like Windows, Mac, Linux, Android, iOS, anything with a browser.

I find that equivalent websites can be made for many mobile apps, the only ones that really need to be actual apps are things that need the performance of compiled code, or need to actually access device features.
>>
How do I get started? I only know how to write .NET applications
>>
>>61037386
Try .NET MVC (C#)
>>
Got turned down for a job after they saw how much I was making.

Did those guys really think I was going to move a state away for like 30k? lol
>>
>>61037386
.NET Core MVC
>>
How do I go on about creating a multi page forum
Each page should allow going back and edit the previous step.
Also every for entry is filling a MySQL database in real time.
I'm new to PHP and MySQL so this is quite a headache
Any help is appreciated
>>
>>61034897
I use it regularly

You essentially send a token to Stripe that is generated by the Stripe API and it'll give your server a response depending on the token sent.
>>
File: Capture.png (11KB, 316x111px) Image search: [Google]
Capture.png
11KB, 316x111px
can i do this in 1 day
>>
>>61015709
>pls don't bully
>it's very early
>looks fucking stunning
>>
>>61039229
Someone could. But not you anon.
>>
>>61039229
gotta agree with dude here >>61039476, definitely not you
>>
>>61039476
;-; d-do it for me?
ill gib u bp ;3
>>
>>61039491
>>61039476
why not tho
all i have to do is make some kind of form for the professor to input text and .pdf/ppt files then save them to a database
>>
Well then prove me wrong.
Fire up your homestead box and get at it.
>>
wow what the fuck I'm watching a beginner tutorial on html and css and stuff and then suddenly he copypastes like a thousand lines of code from another website called bootstrap

Is this what web development is? If so I'm going back to building real programs (copied from stack overflow)
>>
>>61038846
just like you go about making any other website, except this one has different functionality. Open your editor and start writing.
>I'm new to PHP
Well, then learn PHP (learn something else)

Why not work on smaller projects first, where you experiment with the individual parts of what you ultimately want to build.
Really not intending to be rude with this answer, but don't expect to get a detailed step by step guide for such a broad question.

>>61039669
>What are 3rd party frameworks/libraries
It's a commonly used CSS framework.
Unconventional to paste the lines over by hand instead of including the downloaded file or using package management though.
>>
>>61031905
>palossand.com
Why would you admit to that
>>
>>61039229
>manage announcements
This is completely ambigious, I wouldn't touch that job with YOUR dick.
>>
>>61040083
its not a job its a school project for my intro to web prog course
>>
>>61040092
Oh, it seemed like a job spec from a freelance site.
Still ambiguous as its worded there. A day would be pushing it if you're doing it all AJAX with restful endpoints.
>>
>>61040118
im supposed to do it with html/css/js/php and use a database idk ajax
i can make the html and css with design mode on visual studio(used for asp.net) for speed
i can make a first page to ask for course name and semester or something
with that i can make a page with 3 vertical tabs welcome tab with a welcome to x course and a syllabus
lecutre notes tab for like pdf/ppt slides where instructor uploads them and i save them to database maybe
manage announcemts tab is basically text with dates i guess things like midterm is on this hour or something
>>
>>61031905
>palossand.com

got a big kek out of me when darude kicked in. Nice work anon, but please do keep studying and practicing
>>
>>61037386
http://nancyfx.org/
>>
https://p5js.org/

This is fucking brilliant.
>>
I stopped coding for about 4 months. My HTML & CSS is still perfect, but my JS knowledge is shit rusty.

I have an interview next week for a mid level position although I'm a junior. Fuck. How do I go about getting back the skills I had before? What project would be good to make to remember it all?
>>
how do I make a website? I'm good at making static websites through HTML, CSS and some JS but if a client asks me to make them a website that they design for example, how would I go about making it actually function like a website, and not just a pretty design that does nothing?
>>
>>61041187
Do you do back end? Make a todo list. Do you just do front end? Make a slot machine or a countdown timer or something.
>>
>>61041239
Front end.

>slot machine
Interesting, thanks!
>>
File: mpv-shot0009.jpg (89KB, 1280x720px) Image search: [Google]
mpv-shot0009.jpg
89KB, 1280x720px
>>61041066
yes, it also has cute jews

t. 100% hetero male

>>61041187
do codewars.com 10 hours a day for 3 days straight and then make something that requires a lot of dom manipulation
>>
File: 1496600915304.jpg (51KB, 500x524px) Image search: [Google]
1496600915304.jpg
51KB, 500x524px
>>61041203
>how would I go about making it actually function like a website
by learning how to implement the required functionality? Work more with JS, pick a framework, learn a backend, etc.

>what if a client asks me to deliver X
You better learn how to do X

these fucking questions, I swear..
>>
>>61015075
>https://coggle.it/diagram/Vz9LvW8byvN0I38x

Is this legit?
>>
>>61041387
>https://coggle.it/diagram/Vz9LvW8byvN0I38x

what do you mean? Yes, use that as a study guide, though you don't need to know ALL of it to get hired. Also, while Fullstack is more desireable, truth is people tend to focus on either front or back. Go either F or B and just have a minimal competence on the other end and you'll be fine.
>>
>>61041282
>do codewars.com 10 hours a day

I agree, you gotta work on your coding skills with small exercises first, then go for big projects. I don't like codewars though. For whatever reason I find all their exercises really boring, or maybe it's the fact that you can't really choose the topic very well. I find Hackerrank to be a bit better. Same idea though, just pick one and plow your way through the exercises.
>>
>>61041282
>>61041546
Alright, thanks guys

Also what do I say to them when they ask me why I have a gap inbetween my last web dev job? I got fired 3 months ago and didn't code for that time.
>>
File: 1475775014558.png (286KB, 645x1218px) Image search: [Google]
1475775014558.png
286KB, 645x1218px
>no entry level jobs in my city
>>
Should I learn rails?
>>
>>61015458
>responsive
It's wise to instill security procedures early as they'll help you in the later years.

One pitfall rookie programmers make is spewing out websites / applications that have numerous security issues.

Just be weary of it anon.
>>
File: yii2.jpg (4KB, 225x225px) Image search: [Google]
yii2.jpg
4KB, 225x225px
Has anyone here used the Yii2 framework?

I've picked it up recently and I find it quite an enjoyable / comfortable framework to use - provides you with everything you need whilst still feeling lightweight.

What are your guys' opinion on the Yii2 framework?
>>
File: rarestpepe.jpg (198KB, 937x705px) Image search: [Google]
rarestpepe.jpg
198KB, 937x705px
>>61041733
>Entry level jobs expect 3-5 years experience in HTML/CSS/Angular/React/Javascript/C#/Databases/PHP/Node/Photoshop/Dreamweaver/Wordpress and preferably a masters degree in comp sci
>>
>>61041733
Search for ones out of your city then. You can get even visa sponsorships.

https://whoishiring.io

>>61042103
>HR isn't just listing all the shit they can come up with
Just apply to everything.
>>
>>61042103
>he doesn't know that the requirements are always for an "ideal candidate" and the company is well aware they won't find one
>>
File: node_is_the_future.png (28KB, 632x204px) Image search: [Google]
node_is_the_future.png
28KB, 632x204px
Why are companies like Netflix, New York Times, PayPal , Medium, LinkedIn, Uber, and Hapi use node.js?
How can you even scale something that can use only a single thread?
Aren't server CPUs multithreaded?

really makes me think
>>
File: ss-2017-06-23-16-01-35.png (21KB, 952x74px) Image search: [Google]
ss-2017-06-23-16-01-35.png
21KB, 952x74px
>>61042369
that's how
>>
>>61042369
>that pic
Believable, considering how slow rails is.
>>
>>61042135
>HR isn't just listing all the shit they can come up with

this. Those purpled-haired illiterate Clinton-voting faggots have to justify their salary somehow. This guy explains to you what they're like:
>https://www.youtube.com/watch?v=lj2MJnTunuo
>>
>>61042395
they still heavily use node.js.
are they just using up one thread out of 12 of a xeon cpu or something? or do they run several instances of node.js on different threads?
>>
File: 1487523452403.gif (319KB, 1032x510px) Image search: [Google]
1487523452403.gif
319KB, 1032x510px
What do you guys think of my website? 4kev.org
>>
File: thanks vue.png (37KB, 708x389px) Image search: [Google]
thanks vue.png
37KB, 708x389px
https://github.com/vuejs/vue/issues/4101

So, basically, Vue will only ever support one backend software and they "don't plan to work on this" so either use Node or reimplement those function in this side project we worked on with some random Russians or, you know, go fuck yourself?

Thanks Vue, that one was low enough to touch my balls. Regardless, that close reason was so cancerous I'd probably have mutant children anyway.

If you're following the server rendering guy, looks like Vue isn't an option, which is shit, I just realised I could do this:

>>61042369
Node.js isn't a single thread. I have some understanding of what it's doing, it's multithreaded (sort of). Relax. You can still get 10k RPS out of it which against PHP or ruby, is probably hundreds of times faster.

>>61042395
And Java is even faster, Go is semi-compiled and C# can run things competitively as fast as Java
>>
File: whatthe.jpg (6KB, 217x213px) Image search: [Google]
whatthe.jpg
6KB, 217x213px
>>61042672

>browser refreshes on every link you click
>>
>>61042801
isnt that how it works
>>
>>61042952
>What is AJAX?
>>
>>61042952
Some things.

Your website is extremely reliant on PHP so you have a tendency to want to add everything at the reload instead of using Ajax requests.

Sometimes your website takes up to 200ms from the backend. This is obvious because the front page hits in over 400ms but everything else is doing 200ms. PHP isn't good for you bro. It's not easier in the long run.

>>61042978
He's got Ajax.
>>
>>61042978
so the site requires javascript for basic navigation?

>>61042999
I'm not the guy with the site btw
>>
File: 1491923251753.jpg (36KB, 700x375px) Image search: [Google]
1491923251753.jpg
36KB, 700x375px
>>61042056
It's a good framework, solid and easy to learn!
>>
>>61042952
>>61042978

Also... <center> tags?
<table> for one element (the board title)?
Your styling is awful. It looks like My First Website from like '99. Nothing is responsive, in any definition of the word.
You're using pure PHP/jQuery, which, while fine, shows no real deeper knowledge of front-end dev.
>>
>>61043015
No, but clicking 'reply' for example shouldn't refresh and reload a page and scroll it to the top.
>>
I am using two free shared hosting providers, 000webhost and byet.host and I want to upload my laravel project to byet host.

Everything was smooth on 000webhost, uploaded all files in root directory and moved public dir from laravel to public_html dir and that was that.

But on byet there is htdocs dir and when I upload laravel there and try it , it reports 500 error.

Please advise I am going insane over this, searched on google for days for help and found nothing.

>captcha: please
>>
>>61040023
>>61040357
Eh, it was just a stupid joke I threw together over the course of a couple days last year; I wouldn't say it's representative of me as a whole.
>>
>>61039669
>If so I'm going back to building real programs (copied from stack overflow)
kek
>>
>>61043064
>clicking 'reply' for example shouldn't refresh and reload a page and scroll it to the top
Well yes, that makes sense.

>>61043050
Still not that guy.
>center
wew
>>
>>61042999

PHP is fine. As is is Python, etc. I dont get why people bash PHP because someone uses in an old fashion way. For a simple site like that I don't even see the need for PHP. But PHP is great for working with DB's. Lots of cloud services are written in PHP.
>>
>>61015709
Anon, I'm going to bully you because I've been a dev for years and I still can't make something that looks clean and good like this. Consider yourself bullied.
>>
>>61043116
correction: you've been code monkey for years and didnt progress at all
>>
>>61043111
Oh PHP and Python ARE fine, of course. Hell, for data manipulation, Python's great. But a site like his - a live forum website - necessitates actual AJAX, not 'refresh page every time someone clicks something'.
>>
>>61043135
>designer = developer
Nah, I just stay away from pure design stuff. I realize it's never gonna be my strong suite.
>>
>>61043148
you contradict yourself now in effort to sound less retarded which backfired tremendiously

just pathetic, classic /g/
>>
>>61043064
Does on 4chan too. Another PHP site.

Guys. Node.js, C#, Java or Go. These are generally your best options as far as lots of libraries, lots of choice and performance so shit doesn't randomly take 5 seconds to load.

>not being the stereotype that smelly white neets on 4chan make the best programmers

>>61043071
>not using Linux and SCP/SSH
Why?

>>61043111
>>61043138
They're "fine" but they all run at a time when efficiency is critical and returning fast can mean "responsiveness." They're actually bad web languages for that reason.

A good web language is a tradeoff between data manipulation and performance. Obviously not assembly, but not PHP either.

It just doesn't look impressive if your website doesn't respond really, really fast with everything loaded. Ajax + NGINX also works, but you won't get any SEO and some people look for that.
>>
File: thingken.jpg (15KB, 400x326px) Image search: [Google]
thingken.jpg
15KB, 400x326px
Seeing >>61015709 reminds me of something: are we ever gonna get an html input type switch or anything like it? Visually it's a lot more pleasing than a checkbox, but the semantics are 100% the same.
Are we going to have to rely on label hacks forever to make aesthetically pleasing yes/no inputs?
>>
>>61043188
>>not using Linux and SCP/SSH
>Why?
thats not the topic of my question
>>
>>61043138

thats my point, its better to use ajax for routing and all of that, and php/python/whatever for heavier shit.
>>
>>61043205
Honestly dude, fuck your host and fuck PHP. You know what you were getting into.
>>
>>61043323
Honestly how is it my fault that one shitty shared hosting works and other one doesnt? Just wanted to practice some laravel on live website BUT THANKS FOR HELPING!
>>
Why doesn't this work bois?
var nameEnter = prompt('Enter the var value of uselessPrompt');
var newName = ({
if (nameEnter == Steve) {
return 'Your new name is Steven';
} else {
return 'Your new name is Stovon';
}
})

document.write('newName');
>>
>>61043071
>>61043338
Start with everything removed, and build back up to the full site until something breaks.

e.g. start with an HTML file, then serve a basic PHP file without Laravel, etc.
>>
>>61043666
Steve != Steven
>>
>>61043666
var newName;
if (nameEnter == 'Steve') {
newName = 'Your new name is Steven';
} else {
newName = 'Your new name is Stovon';
}
>>
>>61043666
So many fucking reasons.

document.write(
prompt('Enter the var value of uselessPrompt') === 'Steve' ?
'Your new name is Steven' :
'Your new name is Stovon'
);


Also, using `prompt` and `document.write` is retarded. Worst code I've ever seen.
>>
>>61043666
>>61043723
var nameEnter = prompt('Enter the var value of uselessPrompt');

var newName;
if (nameEnter == 'Steve') {
newName = 'Your new name is Steven';
} else {
newName = 'Your new name is Stovon';
}
document.write(newName);

//or
var newName = nameEnter == 'Steve' ? 'Steven' : 'Stovon';
document.write('Your new name is ' + newName);
>>
>>61043739
You'd think I have just started with webdev.

Anyway thanks boizzz
>>
>>61043666
I'm going to make a leap of faith and assume that you're going for an immediately invoked function expression, in which case you need the 'function()' keyword before the open curly brace. You also need to actually call the function with '()' at the end of the function.

What it's doing now is trying to interpret that if statement as an inline object, with 'if' as the first property, and it's failing when it doesn't see a colon.
>>
I want to get into PWAs and am willing to start studying the matter. However I am at a crossroad.

My question is:
Ionic2 or React Native?

PS:I don't know any angular or react.
>>
>>61043824
what a shitty point in life
>>
>>61043793
I think he was just expecting 'if' to work as an expression, which it doesn't in javascript, but does in other languages

scala:
val newName = if (nameEnter == "Steve") "Steven" else "Stovon"


>>61043824
React Native. it's going to make your eventual transition to Flutter easier
>>
>>61043666

var nameEnter = prompt('Enter the var value of uselessPrompt');
if (nameEnter == "Steve")
{
console.log("Your new name is Steven");
}
else
{
console.log("Your new name is Stovon");
}
>>
>>61043857
tell me about it
>>
>>61043877
>I think he was just expecting 'if' to work as an expression
Ok, I guess that makes sense. I was assuming based on the curly braces.

Also, not the guy you're replying to, but is Flutter any good, and is it mature enough to use in production? I've been looking at different cross platform mobile solutions, and Flutter seems cool.
>>
>>61043884
>>61043740
>>61043666
>nobody in the wdg can write passable JS
Why am I not surprised?
>>
>>61044000
>passable js

The only passable JS that exists is an empty file.
>>
>>61044000

chrome dev tools threw no error on my code, what is wrong?
>>
>>61043877
>Flutter
It's named after the MLP pony isn't it?
>>
>>61044000
you're wrongly assuming we were trying to write passable js and not modify this guys code just so that it works
>>
>>61044000
>>61044047
also the closest thing to "passable javascript" is typescript
>>
>>61043824
React is easy.

I'm beginning to realise how many different ways it's designed to be that way. Just accept the whole "everything in one file" thing, it's fine and if you notice CSS files depreciate that's even better.

>>61043962
Why are you coming into /wdg/ and asking about cross platform ui frameworks that make people feel like they're web developing?

>>61044000
I can write passable C#? Does that count.
>>
>>61044042
It's a project by Google, so I should hope not.

https://flutter.io/

They're old logo was a butterfly, which I thought was much better.
>>
>>61043962
>Also, not the guy you're replying to, but is Flutter any good, and is it mature enough to use in production?
supposedly https://flutter.io/faq/#who-uses-flutter
>>
I'm trying to mimic a modal component from a framework, I'm using js like the original to set all the classes but the animation is not working, any ideas?
>>
>>61044131
Kill yourself, my man.
>>
How do I find a web dev job that isn't open office? I can't stand that shit
>>
How long would it take to teach myself enough to be able to freelance and make enough money from it?
>>
>>61044374
5 years
>>
>>61044353
Work remote.
>>
>>61044087
>flutter
>butterfly

oh man
>>
>>61041282
Codewars and any kind of competitive programming is stupid. It puts focus on skills and requirements that at worst are counterproductive in real work. Just try to actually create something, maybe work through some advanced tutorial.
>>
>>61044450
i'm not good enough to. i'm still a junior dev.
>>
>>61044403
if he's really dedicated
>>
Hey /wdg/, what's your opinion on handlebars? I've implemented it for server side rendering. Any other good templating libraries that don't have a hard dependency on node?

>>61044374
The unfortunate sad fact why you can't do this, and I won't lie to you, is the same reason I have to just take it and fuck off when I'm rejected for jobs for not enough experience. No one will trust you.
>>
>>61030526
>>61032794
It's pure Vue. I wanted to use it from the ground up for the first time and ditch all the jquery nonsense I had to struggle with in past (professional) projects.

It takes a while to wrap your head around Vue I think but I think it might be worth it. Need to use it more yet.


>>61043148
>>61043135
Dont say that Anon. I'm exactly like you and considered myself just a regular programmer always. I do have an interest in design which I've started practicing lately. But I'm still really new at it and trying to figure things out. Also my past few hobby projects looked much worse. Just experiment with a lot of different stuff. (Aka copy other good looking websites).

I've still a long way to go myself.
>>
Wait a sec, one can actually make sprite atlases for webpages like people do in games? It is worth it, right?

I remember gaining a huge performance boost in my game pet project by replacing raw images with several 4096x4096 maps
>>
>>61015140
>https://freelancesharp.com
On hover, the grey of the links on in the top nav bar looks pretty bad. Diggin the purplish red though.
>>
>>61043071
Did you checked apache error log?
>>
Cheap VPS hosting?

Google cloud is $16/cpu.
AWS is more.
There are alot of other hosts but they dont actually give you the amount of cpu they said. Its all shared or burst crap.
>>
this shitty database im working with has shitty named columns because the person who made the database didn't know what they were doing, example:
data.ship-id#


so now i cant go data.COLUMN_NAME_HERE after I convert the data to JSON. Is there another way to do it?
>>
>>61045388
DigitalOcean is the goto.. can't really go wrong
Vultr generally offers better hardware for the same $
Scaleway for the cheap, but you have to take care of your own backups, if you ever need any

check bottom of the OP
>>
How much do you charge your clients for a simple WordPress site that you build from the ground up?
>>
>>61045481
data[COLUMN_NAME_HERE]?
>>
>>61045009
>Wait a sec, one can actually make sprite atlases for webpages like people do in games?
no. you can't make <img> or css background display only a region of a image.
>>
>>61044706
Same guy here implementing the server side rendering stuff in C#. Because this seems mostly easy and client side only templating libraries don't have a hard dependency on node. Handlebars.js and hogan.js already both work, and I'm going to try moustache.js tomorrow if it doesn't require a document DOM. Even if the "vanilla" option isn't bad, it runs code within delimited regions and sets props as the input object.

This lets you do horrendous stuff like
<div>{if(props.name == "Garry") "Fuck off Gary"; else props.name;</div>

Which will tell Gary to fuck right off, because all of that is valid Javascript, not even using return will still be picked up by vroomjs.

This raises the question, what do other frameworks do that's so damn good? This isn't even a framework, it's me setting one variable and running your code.

At the moment, the boilerplate code looks like this:
var n = new ScriptedPage("main.html", "{\"name\": \"Gary\"}");
n.TemplateFramework = ScriptedPage.Templating.Hogan;
n.get = (a, b) => JsonConvert.SerializeObject(new { name = a });
new Server(new[] { n });

That's C# code in case you don't know.

I'm also working on something that lets you define your own template framework, but I'm not sure if the user function should return code or it should return the finished HTML itself. It's a little too weird to expect people to write javascript code into a C# string.

I'll release this within a week or so, things seem to mostly be working. Vue fanboys have my condolences.

Check this: https://www.nuget.org/packages/FAP.React/ when it's ready.
>>
>>61045545

data['COLUMN_NAME_HERE'] is what i needed

thanks
>>
>>61045579
but senpai https://www.w3schools.com/css/css_image_sprites.asp
>>
>>61045594
Same guy.

Just tried moustache, because compulsion and it's easy. Yep, it works. By this stage I'm happy with what I've got, you can have server side rendered templated html using whatever dumb framework you want.

For those interested:
case Templating.Vanilla:
oldtext = TemplateSegments.ToString(newprops);
break;
case Templating.Handlebars:
using (var engine = FEngine.BlankPool.GetContext()) {
engine.Instance.SetVariable("source", TemplateSegments.Source);
oldtext = Template.GetString(engine.Instance.Execute(string.Format("Handlebars.compile(source)({0});", newprops)));
}
break;
case Templating.Hogan:
using (var engine = FEngine.BlankPool.GetContext()) {
engine.Instance.SetVariable("source", TemplateSegments.Source);
oldtext = Template.GetString(engine.Instance.Execute(string.Format("Hogan.compile(source).render({0});", newprops)));
}
break;
case Templating.Moustache:
using (var engine = FEngine.BlankPool.GetContext()) {
engine.Instance.SetVariable("source", TemplateSegments.Source);
oldtext = Template.GetString(engine.Instance.Execute(string.Format("Mustache.render(source,{0});", newprops)));
}
break;

It's interesting how even though they're all based off of each other, their APIs have to be just so slightly varying.
>>
File: minions_share_kill_yourself.jpg (48KB, 640x497px) Image search: [Google]
minions_share_kill_yourself.jpg
48KB, 640x497px
So I just figured out, after about a half hour of trying to read documentation and examples for the code to display a single page in WordPress, that you have to use The Loop. Yes, it's capitalized, because WordPress is apparently a fucking religion. Possibly even a cult. The kind that sacrifices good code that's actually sensible and sanely interpretable in exchange for uniformity and I guess fewer words to explain to people who are attempting WordPress theme development without knowing how to program first.

You have to loop through all one page in order to display it. What the fuck even is this?
>>
<style>
@charset "utf-8";
h1 {
font-weight: bold;
font-family: arial;
color: white;
font-size: 250%;
}
h2 {
font-family: arial;
color: white;
font-size: 150%;
}
</style>
<div align="center">
<div style="height:20%;"></div>
<img src="image.png" width="auto" height="30%" style="border-radius:50%"/></div>
<h1>header</h1>
<h2>subheader</h2>


I'm trying to get this image to scale with the page, so if I zoom out, the text and images will stay the same
is there a way to do that in CSS? I detest javascript
>>
File: neat-bender.jpg (28KB, 500x491px) Image search: [Google]
neat-bender.jpg
28KB, 500x491px
>>61045741
neat
>>
>>61045388
depends on how much cpu you need
for my basic html/css sites I use ramnode
$15/yr for the basic VPS, only gets you 128 megs for RAM though
>>
>>61046098
can you explain what "The Loop" is in WP?

>>61046295
vw/vh units?
>>
>>61046418
how does that work?
<img src="image.png" vw="auto" vh="30%" style="border-radius:50%"/>
>>
>>61046398

That is very little ram, what servers do you run?
>>
>>61046557
one of them is basically just a front end for a bunch of SWF files
the other one is my main webserver/owncloud/email, which I use the 1GB CVZ vps for, which is $108/yr
>>
>>61046599

Ok but what server app?

I want to know if apache or whatever that fits that ammount of ram.
>>
File: htop.png (74KB, 1600x682px) Image search: [Google]
htop.png
74KB, 1600x682px
>>61046619
oh right
pretty sure I'm running apache as part of the LAMP stack
for email I use the iredmail package

I'm the only one really using it, so I'm not sure if it'd be stable with multiple people
>>
>>61046619
>>61046669
here's the 128 meg vps
>>
>>61046691
>>61046669

Thanks for showing.
>>
>>61045741
yeah, it reduces the number of network requests, but it most likely doesn't work like in game engines where there is performance benefit coming from reducing the number of times a different texture is bound
>>
File: 1470139919049.jpg (30KB, 621x474px) Image search: [Google]
1470139919049.jpg
30KB, 621x474px
I'm programming a webapp at work that has only ever been worked on simultaneously by one person and has been passed down from the previous developer for a new guy with 0 introduction at least 4 times now because the last guy got sick and tired of that shit.

It's a mess of terrifying hacks, shit that works by accident, shit that should work but doesnt, shit that shouldnt work but does, and atleast billion different libraries and frameworks because everybody just picked their favorites and disregarded consistency, and every single page looks different.

At this point I just wanna destroy the source code, change my name and move to Congo and start over.

Don't get code monkey jobs at companies that dont actually care about their web products, kids.
>>
>>61046775
>performance of a webserver compared to a video game
>>
Any obvious holes or mistakes in my bcrypt implementation? Perl doesn't have one built in, and cpan doesn't really have any that feel all too great either, so I decided maybe I should just do it myself

package Bcrypt::PasswordUtil;

use strict;
use warnings;

use Data::Entropy::Algorithms qw(rand_bits);
use Crypt::Eksblowfish::Bcrypt qw(bcrypt bcrypt_hash en_base64);

sub password_hash {
my ($password, $salt, $cost) = @_;
my $bits = 128;

if(defined $salt) {
if($salt =~ m/\A\$2(a?)\$([0-9]{2})\$([.\/A-Za-z0-9]{22})/) {
return bcrypt($password, $salt)
}
else {
use bytes;

if(length($salt) != 16) {
no bytes;
$salt = rand_bits($bits)
}
else {
no bytes
}
}
}
else {
$salt = rand_bits($bits)
}

$cost = ($cost && $cost =~ /^[0-9]{2}$/ && $cost > 4 && $cost < 31) ? $cost : 10;

my $hash = bcrypt_hash(
{ key_nul => 1, cost => $cost, salt => $salt }, $password);

return "\$2a\$$cost\$" . en_base64($salt) . en_base64($hash)
}
>>
>>61046837
Oh, and everything is impossible to refactor. It all _barely_ works in some delicate balance and if you so much as rename a variable you tip it over and it explodes in production.
>>
>>61046839
>performance of web browser renderer to game engine renderer
FTFY
>>
>>61046864
Obviously I'm not doing any of the crypto stuff myself. Its more about the API around the crypto
>>
File: 1489768509515.png (947B, 416x454px) Image search: [Google]
1489768509515.png
947B, 416x454px
>HTML Validator
Error: Saw a start tag image.
>>
What's a small (but ultimately useful) project to try a front end framework on? Add bootstrap to that question too and SASS. I've only ever built front end using vanilla CSS and JS.
>>
>>61047000
Simple discussion board.
>>
>>61046837
I feel you bro. I'm currently dealing with some shitty project that was before outsourced to some agency in Pakistan. Half of the code makes no sense, and half of the things don't work and I don't know where to start to unfuck the frankencode. I will wake up tomorrow knowing that I have to somehow make it work within few weeks.
>>
>>61046870
kek tell us more about the company so we know how to spot similar ones. What size? Where is it located?
>>
>>61047157
I dont think size matters, nor location. It's in Europe.

The most important factor you should look at to avoid these jobs is how quickly the people change there.

Since I joined couple of years ago probably 50% of the original staff has left and been replaced with new people. Oh and the company only looks to hire beginners (like me) because they dont ask ask much for pay (like stupid me).

The quality of the software in other products they make is bad also because of that.
>>
>>61044507
You're too harsh. It's a sport, like speed chess. As long as people realize this, it is fine.
>>
>>61041779
Are you new to programming and/or web dev? If you are, yes. Follow https://www.railstutorial.org/book. If not, try Phoenix first.
>>
>>61046448
they're css units
>>
>>61042487
Also https://www.youtube.com/watch?v=4Z1CfQRudck
>>
>>61046418
>can you explain what "The Loop" is in WP?

It's basically a set of functions and the basic structure of their usage to display blog posts; it's kind of core to WordPress because it's mainly a blogging platform. I just didn't realize that I had to use it to display pages as well.

Basically, it's an iterator, where the state is hidden from you. And the things that it iterates over are dependent on what thing is currently being requested. But they don't say that anywhere, at least from what I read on the documentation on the site.

The basic functions are:
have_posts()
, which is basically your Iterator.hasNext() function
the_post()
, which is basically your Iterator.next() function, except it also initializes it for the first item
And then there are a bunch like
the_title
and
the_content
, which are like Iterator.current.title and Iterator.current.content

They refer to
while ( have_posts() ) : the_post();
as "starting the loop", and it's kind of a WordPress idiom I guess.

The content of the iterator is based on which page you're currently requesting. So if you're requesting the first page of the list of blog posts, and it's set to display 5 posts at a time, the iterator will contain the first 5 blog posts. If you request the next page, the same exact template can be queried, but it will have the next 5 blog posts in the iterator.

That all makes sense, until you're writing the templates to display a single post, or a single page, and you still use "the loop" to get the content of the page.

In my opinion, this is the clearest explanation of the wordpress loop. I should probably write a damn blog post about it, because I've already written about half the content.
>>
Clients are asking for angular so they can feel like they know something too. Which one should I learn, Angular2 or AngularJS?
>>
>>61047263
you've been there a few years? Why can't you get out?
>>
>>61046864
>>61046898
Anyone?
>>
>>61047669
angular 4
>>
>>61047676
I can, it's just a matter of when I've had enough of that bullshit to bother searching for a new place.
>>
>>61047462
I meant it's stupid for learning general webdev. It has type of problems you rarely encounter and encourages solutions that should not use in real world.
>>
>>61045388
http://lowendspirit.com/
>>
div.content {
background: blue;
position: absolute;
top: 50%;
left: 50%;
diplay: inline-block;
}

trying to get this nigger to center itself in the center of the page perfectly without having to hard code the dimensions (no px)
it looks fine if I hardcode it but it's not portable that way
>>
>>61048258
https://codepen.io/anon/pen/gRxdaX
>>
new thread
>>61048526
>>
>>61044507
>>61048151
anon's goal was to not to learn webdev but to remind himself how write js. solving a bunch of simple programming challenges in the language is perfect for that.
>>
>>61048560
not to*
obviously doing webdev is
>>
>>61048560
>>61048576
autosubmit fucked me in the ass, let's try again

anon's goal was not to learn webdev but to remind himself how write js*
obviously doing webdev is the best the best way to learn webdev, but if you've got only a couple of days to get comfortable with javascript again then writing html and css is a waste of time
>>
What do you think about gohugo?
Thread posts: 315
Thread images: 47


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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 content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.