/wdg/ - Web Development General

/wdg/ - Web Development General

Previous Thread: > Discord
discord.gg/wdg
OR
discord.gg/0qLTzz5potDFXfdT
(they're the same)

>IRC Channel
#Cred Forumswdg @ irc.rizon.net
Web client: rizon.net/chat

>Learning material
codecademy.com/
bento.io/
programming-motherfucker.com/
github.com/vhf/free-programming-books/blob/master/free-programming-books.md
theodinproject.com/
freecodecamp.com/
w3schools.com/
developer.mozilla.org/
codewars.com/
youtu.be/JxAXlJEmNMg?list=PL7664379246A246CB - "Crockford on JavaScript" lecture series.

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

>Backend development
en.m.wikipedia.org/wiki/Comparison_of_web_application_frameworks
gist.github.com/dypsilon/5819528/

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

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

>How to get started
youtu.be/sBzRwzY7G-k - "2016/2017 MUST-KNOW WEB DEVELOPMENT TECH - Watch this if you want to be a web developer "
youtu.be/zf_cb_Nw5zY - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.

>cheap vps hosting in most western locations
lowendbox.com
digitalocean.com/
linode.com/
heroku.com/
leaseweb.com

Other urls found in this thread:

htmldog.com/
udemy.com/understand-nodejs/
udemy.com/the-complete-aspnet-mvc-5-course
npmjs.com/package/minimux
udemy.com/bootstrap-to-wordpress
udemy.com/php-for-complete-beginners-includes-msql-object-oriented
github.com/YOUR_USER/YOUR_REPO.git
github.com/bvaughn/react-virtualized
github.com/trueadm/inferno
github.com/stevendesu/minimux/blob/master/gulpfile.js
magentocommerce.com/api/soap/introduction.html
github.com/osm2vectortiles/offline-maps
wiki.openstreetmap.org/wiki/Frameworks
github.com/mapbox/tilelive
developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map
my-first-socketio-app.herokuapp.com/#/
eloquentjavascript.net/,
sitepoint.com/java-8-streams-filter-map-reduce/
github.com/ninenines/ranch/blob/master/src/ranch_tcp.erl
es6fiddle.net/it7a42gy/
es6fiddle.net/it7a4do9/
ebookee.pro/pro-asp-net-core-mvc-6th-edition.html
ebookee.pro/laravel-code-smart.html
pcisecuritystandards.org/document_library
reddit.com/r/javascript/comments/538wgm/suggestions_for_optimal_api_for_a_minimalist/
repl.it/languages/javascript
codewars.com/kata/a-chain-adding-function/train/javascript
twitter.com/NSFWRedditGif

Does anyone here have experience with Elm? Can you compare it to React/Angular?

Second for how viable is it to go from neet to job ready. Can I focus all of my time into it to get that result? Live like 30 miles away from NYC.

Hey,

When haroku says one worker on the free plan. Does that mean a single thread or core?

React's Redux is heavily inspired by it iirc. For practical usage, it's probably more practical to just use that for a React project unless you already have an Elm codebase or something.

Angular 1 is a clusterfuck of two-way binding and statefulness. Pretty much the opposite of the Elm/React/Redux philosophy. I haven't tried Angular 2 since I'm waiting to see if they really are done changing everything around this time.

>Live like 30 miles away from NYC
Shit nigger, you're playing on easy mode. Have some discipline and code every day and you'll be on your way.

One core, I'm pretty sure. With a PaaS like Heroku, that's abstracted away. The only difference with the free plan is that you can't create new instances of your app and only get x hours/month of runtime. (Pretty sure it's enough to run one thing continuously.)

>Shit nigger, you're playing on easy mode. Have some discipline and code every day and you'll be on your way.

Thanks bro

We're all gonna make it

>finish website for client
>he says thank you, etc., pays me the rest of my money
>two months later he hires a new assistant
>new assistant wants some "free" adjustments to the website
>I stupidly say sure if they're minor fixes, because I want to keep my client on good terms
>she proceeds to send me a Word doc with about 80 things she wants done to the site, including increasing the font-sizes throughout the site to ugly huge sizes
>I do it, because I think that's what the old client wanted and he must have approved of it
>get another Word doc days later, demanding the font-sizes be increased EVEN MORE
>website is now totally broken, the design is broken, it looks like shit
>get another Word doc demanding I fix the site
>reply that this is now cutting into my normal work day and I will be forced to prorate the hours and have the client sign off on a timesheet
>get a string of angry emails in my box this morning

Anyone who unironically wants 20px+ body copy can unironically McFucking kill themselves. Go buy some fucking glasses. Stop killing the internet.

>Second for how viable is it to go from neet to job ready. Can I focus all of my time into it to get that result? Live like 30 miles away from NYC.
Put together a crappy portfolio site.

Demo at least 3 complete websites you've done.

If you don't have 3 complete websites, volunteer, do some pro bono work and get 3 complete websites.

Don't bother with the resume and all that gayness. If you see a job you want, apply, and send them the link to your portfolio site. No one actually involved in the pipeline will read your resume, nobody gives a shit except catty HR ladies.

If your portfolio is good, and you interview well, you will be hired. It's that simple. This is a "What do you know, what can you do?" industry. Fancy words on paper mean dick.

anybody know a good website to look for web dev jobs in europe in general? I'm in Madrid but I can pretty much relocate to anywhere, but going through job search engines country by country is a pain in the ass. Help?

Should have told them about ctrl+scroll

I wrote a pointed email back and literally said the issue is an end-user problem, not a cross-platform one.
Translation: I'm not doing it. The problem is you.

This ain't so bad.

Did you really screenshot a post just to point out a typo

Nope. I took a screenshot of that post with 20px+ font because I think large fonts aren't bad.
(Chrome highlights a word on right-click)

>mfw doing ASP.NET MVC tutorial

I have a OOP and webdev background and it feels like a mess

>because I think large fonts aren't bad.
A sentence or two of it isn't bad.

Try 8 paragraphs with no line-height in a 1060 layout with black text.

I also dont like the websites where the client suggested the design or changes to the design.
It always gets worse. And they often want things that require stupid hacks or a bazillion classes.

The best sites are still the ones where you have creative freedom.

Hello. Please help.

How is this for web dev shit?
>HTML - w3schools
>CSS,bootstraps - w3schools
>JS(jquery,angular,react,popular framworks)-w3schools. eloquent javascript, CC
>PHP-w3schools, CC
>SQL-w3schools, CC
>Python- CC, Learn Python the Hard Way,sololearn
>Java(maybe)-CC,sololearn

Can you recommend any other good resources? How plentiful are jobs in NYC? Is it better to be an "expert" a few languages and branch out from there or should you start with a broad feel? Is it even possible to master a language (know everything about it).

>w3schools

I really like the way they show some of their stuff but w3fools exists and people claim their shit is insanely out of date and not a good way to learn shit so I don't know.

It's 'out of date' in that they still show methods of doing things that are no longer in favored practice, tables being the obvious one. But it's still a good reference guide for people who are new to HTML. I still hit it up every now and then when I forget something, it happens to all of us.

If I had to go back to my college class and lecture people, I would tell them that they need to learn
HTML
CSS
Java
and some PHP, in that particular order.

Some would say 'Bootstrap', but they've so ridiculously documented it that there's no reason to go out of your way to learn every single thing about it at first, as a lot of their modules are practically drag-and-drop. Learning basic Java is more important so you understand WHY these things in Bootstrap work the way they do.

I was severely crippled coming out of college because they filled our course path up with garbage classes and never taught us Java. When you get out of school, webdev companies will EXPECT you to know some Java.

I would start with the codecademy stuff on html/css/js first so you get a feel for how things work, then go with FCC/Odin for a while. Then you should have a feel for the languages enough to branch out into other tutorials and whatnot.

>JS(jquery,angular,react,popular framworks)-w3schools. eloquent javascript, CC
Eloquent is pretty good. w3s is overall decent, with some outdated stuff. Just be sure to concentrate on learning the fundamentals of vanilla JS before branching out into all the frameworks and shit.

>PHP-w3schools, CC
>SQL-w3schools, CC
>Python- CC, Learn Python the Hard Way,sololearn
>Java(maybe)-CC,sololearn
That's too much. Concentrate on one thing and git gud at it. Don't try to learn every language out there. For backend stuff, go with either Python, Ruby, Java, C#, or PHP. (or Node, but you should already know JS by this point anyway.) They're all good options. Then learn some popular backend frameworks for whatever your chosen language is.

Then, once you have a base understanding of that, learn about databases and SQL and all that. Continue to practice with everything. Once you're an expert at one backend stack, it's a lot easier to transfer to a different one. If you try to learn them all at the same time, you're just going to get burnt out.

Can you recommend any other good resources?
The "How to get started" stuff in the OP
htmldog.com/
MDN

>How plentiful are jobs in NYC?
Plentiful. It's no Si Valley, but it's up there. There are also tons of meetup groups and conferences.

>Is it better to be an "expert" a few languages and branch out from there or should you start with a broad feel?
Most programming languages are very similar in a lot of ways. As a beginner, you should focus on one for a while till you get a feel for it. Once you're pretty good with it, other languages will come a lot easier. Just learn new stuff as you have a need for it.

>Is it even possible to master a language
Of course. It just takes a while.

Unless you're planning on using Spring or something, there's really no need to learn Java for web development

I'm doing the html course on codecademy. Pretty easy stuff, but the bad news is that I'm really enjoying html. Holy shit, was I born to be a Pajeet-tier code monkey? Oh please, God, no.

Maybe you should look into web design instead so you can do html/CSS with Photoshop and UI shit so you don't have to be a cubicle coding pajeet and instead a colorful staving artist pajeet.

what's the average salary difference between web design and web dev? Which one is it harder to get into?

Just asking out of curiosity, I don't really think I'm a Photoshop guy, visual arts are not really my thing.

I just get people who want me to steal professional construction/architectural plans, designs, professional photos, youtube videos that say educational purposes only, etc

So much that my portfolio is empty because its so goddamned shady.

Oh yeah and I've yet to meet a small business owner who pays their fair share of taxes.

How do I vertically center a position: absolute div to pop up in the middle of the linkquote?

I have the opposite problem: I hand off a site to a client, put it into my portfolio, and then when I check the site a few months later they've hired some third party and fucked it all up. So then I have to hastily take if off my portfolio site, lest someone actually see it.

I don't know how anyone can get around this, without a "Don't do anything to this site without my permission" clause in the contract, or simply hosting the site for the client.

I don't know but I think skillcrush estimates web design to be lower by like 10k I think but there was another titled called something desginer which I think was more full on art and est. pay was like 80k. too lazy to google for you tho so that's the best I can do.

Entry level devs make easily twice what designers make, and there's a lot more room for promotions. The job also usually encompasses a lot more

At my day job I sometimes interact with "web design professionals" *shudder* and as far as I can tell people in the industry exclusively deal in photoshopped static images of their designs and whats live hosted on the internet is a fucking joke because webshit is standardless anyways not to mention the infinite avenues for dumb fuckery

I studied law. And my gut feeling says you still own the copyright. You could sue.

If it's something you're proud of, put a copy of it on your portfolio site or take screenshots.

Use top in your style/css.

Better go study some more, that's not how copyright law works. A contractor doesn't retain the copyright to something they make for a client. (Unless that was specifically stated in the contract. Even then, I doubt it would hold up in court.)

>full time neet
>spent time trying to learn unity to make games because I'm addicted to games
>decide I need to get a job to fund my loli figure collection
>learning javascript
>mfw I'm zooming through everything because it's like C# except it does web stuff

I wish I started this earlier I could have prob had a job by now.

any good/known registration forms I could use for my website? I don't want to code my own cause I'm new with php and god forbid a mysql attack

what did you sell exactly? the site only or updates too?

formspree.

Of the hosting websites in the OP, which do you guys recommend the most?

Who took Scaleway from the VPS hosting list?

perhaps the new assistant had a very high resolution screen or something, and your website wasn't very responsive?
also,
>>I stupidly say sure if they're minor fixes
should have told her "these aren't minor fixes"

Personally, I use namecheap for shared, digital ocean for VPSs

Thanks these seem like good options. I used namecheap to register my site so that could work

No, mine is a high-res screen, and I always test across platform before FTPing anything. She was probably viewing this on a 2006-era Mac with bad eyes and then complaining about the font.

>should have told her "these aren't minor fixes"
I typically try to do quick fixes for free on client sites because it makes them trust me and come back for repeat business. That usually means minor adjustments to the style, or fixing typos on copy they provided, etc.

When it becomes, okay, this will take up a half or whole workday, then they have to pay for it.

Site only.

I'll put the site online for them and hand them the deliverables, and after that they're on their own unless they want more from me. But in that gap period, I've had people hire other designers to "add" things that break the site.

am i gonna get sued for using a .com url in a non-commercial way

lol wut

How do you stay motivated? I've been trying to start a project for weeks but I can never move past planning. Maybe I'm just too used to having a concrete goal via college courses.

same here. I've been thinking about getting a profile on freelancer or Odesk or any of those and just doing projects for the experience, but would anyone even hire me?

>but would anyone even hire me?

try and find out

How do I offset ().top in regular javascript?

Trying to change style of navbar when user scrolls below it.

Just learn back-end dev with C#.

Plenty of jobs with it

I have 0 design sense and was looking at popular e-commerce websites. Most of them are white on-grey with the lots of whitespace, only color coming from the banner or products, and with no personality

Is that what I should be aiming for, because it feels a little bland. I miss how sites looked back in the late 2000s

It's supposed to give it a minimal and professional look. You can clutter your shit and have music playing in the background like the good old days, too, though.

Day 5 of job search. Motivated more than when I started.

Just finished react.js part 1 on codeacademy (boy do I hate that webstie) cos I applied for some job, they asked about react experience and I didn't want to say "none". Got that done and replied that while I haven't done any projects in it I do have a basic knowledge of it, its syntax etc. Planning on finishing the 2nd part of that shitshow, checking it out a bit more and putting it on my CV as "Basic knowledge of react.js". 's always something. Maybe I'll even remake something I've done previously with it.

I'm currently finishing a JS-heavy Steam based project to then move on to Laravel while putting up a portfolio website and remaking my CMS with said Laravel.

A project can be literally anything. My first was rewriting a function the teacher gave us cos I found it simplistic and it only had one usage. From 20 to 720 lines (incl commentary) and even though I don't think anyone used it apart from myself I'm glad I did that. The learning experience alone was worth it. If you don't have anything like that try making something you or your friends would use. That's the case with my steam app.


Stay busy and good luck out there.

Also, for all the peeps who are starting to look for a job, I suggest checking out /watch?v=6G3kQyqMFpQ The sooner you understand to apply everywhere, the better.

how the fuck do i make a delete request using angular
it never sends any data

He does own the copyright. Unless you specify it in the contract.
Some businesses make a living out of sueing their clients.

Anyone with experience with Firefox's WebExtensions?
Is there a way to package a WE for personal use? The Mozilla docs all point to their stupid ass signing API which requires uploading the WE to their server, but this is just something I'll use on my local browser, I don't need a signature
They have a way to load extensions directly from a folder, but for some retarded reason extensions loaded that way are automatically unloaded when you close the browser

>Just learn back-end dev with C#.

can you spell out a bit more what this entails? Do I need HTML/CSS, javascript, etc? Or just do fucking C# and fuck everything else? Sorry, my idea of the division between front and back is blurry.

So now that Angular 2 final has been released, how big is the size of a properly compiled application? How are the bootstrapping times?

just go on udemy and buy something like udemy.com/understand-nodejs/ or udemy.com/the-complete-aspnet-mvc-5-course

or pirate them and buy them later when you're swimming in mad $cashmoney$ and you feel guilty about having pirated these courses which got you started in life

Yes.

Look up .net web development.

There's probably some CORS fuckery going on.

>Do I need HTML/CSS, javascript, etc? Or just do fucking C# and fuck everything else?

Theoretically you could get by with just C# if you only ever made api stuff that just shits out JSON, but in practice you need a frontend of some kind. HTML & CSS are easy as fuck though. You can almost become an expert in them over a weekend. You might be able to get by with minimal JS, but realistically you're going to need a working knowledge of it or no one will hire you.

>You can almost become an expert in them over a weekend.

Of course not.

You can hardly read through all the syntax, let alone do a project. HTML and CSS are easy, but not that easy that you don't make mistakes when you do bigger project.

Just a simple question: What do you use for font size?
Em? Rem? Cm? Px? Pt? %?
What are the advantages / disadvatages for each of those?

Of course you will quickly google that on stack overflow, but surprise, there's more than meets the eye here.

>see perfect job
>requires "4 fully-customized wordpress examples" to apply

Fuuuuuuuuuuuuck

Can I just pump out 4 bootstrap shitlets and put the loop in there?

You just said it's a perfect job...
Get to work and land it, fgt.

I'm taking a mini vacation next week to make the sites.

Going to stream it all because I don't know wordpress theming and people might help.

Also it's only perfect because it's entry-level but yesh, exciting.

Is there a way to make Javascript functions execute local .exe files on my computer, assuming the HTML site, JS file and .exe are all in the same folder (not remote)?

No. That's a security risk.

In NodeJS, you can.

Fair enough, maybe not an "expert", but you can at least learn the syntax and general usage. That + knowing how to google and you have enough to start doing backend stuff.

>HTML and CSS are easy, but not that easy that you don't make mistakes when you do bigger project.
Never said anything about not making mistakes. Even experts still make mistakes all the time.

As for the font size thing, em is what you want most of the time, so most up-to-date guides and tutorials teach you to use it. The other ones are more niche for the most part, but even a noob can easily intuit that a bigger number means bigger font-size and experiment from there. And anyway, there's nothing wrong with googling stuff like that even as an expert. You'll naturally remember the things you use a lot, and for the things you don't use a lot, just look them up. Docs exist for a reason.

That would be a monumentally stupid thing to allow for regular client-side JS. You can use Node to execute files, but most likely you can also do whatever you're trying to do within node itself.

Last night I created an NPM package, and today I'm looking to start adding some functionality to it. I'm wondering if any JS / Node gurus here can give me their opinions

npmjs.com/package/minimux

My package is meant to be a minimalist state manager. Currently it's designed around React, but I plan to drop this as a dependency.

The only two components at the moment (and I'll be hard pressed to be convinced more are necessary) are a pub/sub event broadcaster and a middleware manager. Using these two things you can:

>Request an update to the state
>Be notified of an update to the state
>Modify requests to update the state in transmission
>Modified the state after updates
>Hook into any of the above to add additional functionality (like recording all past events for replay later)

I hacked the whole thing together mostly from scratch, using one PHP library for inspiration for how to implement middleware. When I did so, I had several considerations noted in the comments that I wanted to address:

>The publish / subscribe functions had no return values, and there was no way to UNsubscribe
>Everything operates on the FULL state and not subsets of it. Maybe we want to make it more modular
>Currently "be notified of an update to the state" is done by re-rendering React components
>There's no CJS / AMD / UMD support
>There's no good error handling or exception throwing
>The code is a bit ugly
>I don't know if my method names are good or if I should go with something more standard ("subscribe" instead of "listen", etc)

Today I'm planning to address these things. Of course I intend to address them in a backwards-compatible way (leaving both "listen" and "subscribe" if I add a subscribe method) until I'm happy and decided on the API, then I'll release v2.0 with any cruft deprecated and removed.

My main goal right now is to seek people with plenty of experience to hear their opinions or how they would use such a library. I'm open to all advice.

Other than the blog post readme, it looks okay. Will check out in more detail later.

Yeah, I spent about 30 minutes writing the code and about 2 hours making the README. I got a bit into it.

I'd suggest ignoring 90% of the README, spinning up a project, running "npm install minimux", and trying out some of the "usage" stuff

While I'm at it, I notice when looking at the React source code there are several places where they say something like:

if ("development" !== "production")

This is obviously intended to prevent (or allow) code to run in one environment versus the other, although the line makes almost no sense when you see it pre-build (it makes a lot more sense as "if (process.env.NODE_ENV..."). I'm curious if there's a good way to implement something like this in the final built version in a way that's safe for all possible uses (being loaded via NPM, being directly included on a page as a script tag, etc)

Maybe something like:

var env = process ? process.env.NODE_ENV : "development";

Then a good minifier could rip this out (since it's essentially a constant and only used in IF statements) so the final code doesn't show it but anyone including it gets the benefits of different development and production builds

you could, but you need to find a security vulnerability :^)

>web '''''devs'''''
Hilarious

>udemy

how good are these udemy courses? I don't want to fall for yet another meme

I bought two. One was udemy.com/bootstrap-to-wordpress and apart from wanting to strangle the instructor, it was kay. I did this one a year ago and I might go back soon to check whether it still holds up. I never used WP after this thing so at least I'll refresh some WP.

Second one was udemy.com/php-for-complete-beginners-includes-msql-object-oriented and I used this one as a base for my end project. Had to put it on x1,5 not to fall asleep. Other than that it had its "basic" moments but afaik many of courses on udemy have that due to wanting to appeal to everyone.

You can always just get one in a way in which you wouldn't get a car and if you'll like it or find it valuable buy it during a sale. I paid ~20€ for each of those and I'd say it was an okay price.

>You can always just get one in a way in which you wouldn't get a car
lel of course I'm doing that, not even thinking about paying for them yet (if I get rich later on, I just might). The question was geared towards investing 25+ hours in something that might not be really useful at all. But yeah, I'll give it a shot. Gonna try out The Complete Web Dev Course to begin with.

Can anybody tell me which is better, Udemy or the Codecademy course on HTML/CSS + Web Dev?

I can set up Git on my machine but I still don't have any clue how to make my commits appear on GitHub, even the official documentation didn't help, any good tutorials out there?

First off, try to remember that git and GitHub are two separate things. GitHub is a third-party company that hosts git repos for you, but using git does NOT require GitHub in ANY way.

Next, I find that learning anything is easiest when you have a goal in mind and just take it one step at a time. Trying to watch a full-fledged git tutorial will just confuse and annoy you. But if you instead use git on a personal project and just ask for help whenever you hit a wall then one little recipe at a time you'll start to learn how to use it. Eventually you'll start to see connections and understand the deeper ideas behind it and how it works. Then before long you'll be an expert.

As for your first question of getting commits to appear, there's a few steps you need to take:

First, make sure GitHub is set as a remote:

>git remote -v

If not, add it:

>git remote add origin github.com/YOUR_USER/YOUR_REPO.git

Next, make sure you have commits

>git log

If not, make one:

>git add *
>git commit -m "COMMIT MESSAGE"

Finally, push your commits:

>git push origin

It may ask you for your GitHub username and password if you didn't store these in a config file

What's better?

[email protected]

[email protected]

Thank you so much user, your explanation was flawless.

Large fonts aren't bad for headers, but sure as fuck don't belong in body copies.

There's never any point in using react for an industrial sized application, right? Our tables are so slow, and our clients need most of them to be unpaginated. We need to directly modify the dom in most cases.

I'm considering making a resume and spitting it out to job openings even though I'm inexperienced as fuck, good idea or should I not?

I know for some jobs they'd rather have new people to mold them and teach them instead of ones who have set standards, although maybe that's more of a retail thing, not sure.

React will work just as well on an "industrial sized application" as it will on anything. It won't magically fix a shitty UI, though.

>Our tables are so slow, and our clients need most of them to be unpaginated.

Why would they need it to be unpaginated? Humans are really shitty at going over massive lists of raw tabular data. That's what spreadsheets are for. Give them a search / sorting tool to refine the data to just what they need or offer it up in a machine readable format. Or both.

I know you can use things like Phonegap to make mobile apps with HTML/CSS/JS, but what about widgets? Can I use it to make a custom widget for my (Android) phone? Do I even need Phonegap for that?

Our clients handle sensitive health care information, and in the legacy system they were able to see the entire page if they were able to edit the entire page at once. There's a concern that if they were to violate the standard of WYSIWYG and paginate tables where it displays a large amount of data and must save it all at once, their users would inadvertently save incorrect healthcare information.
However, they also want new dynamic features.

github.com/bvaughn/react-virtualized

You saved my company.

You could've saved your own company with a google search desu

But while we're at it, there are some alternatives to React with the same API but more focus on performance. This one especially: github.com/trueadm/inferno

One downside of the first library I linked is that ctrl-f probably won't work on the page since not all the rows are rendered. There may be workarounds for that though

I searched plenty for this. I just used the wrong search terms.

In case anyone's interested, I figured out how to do the if("development"!=="production") bit I was interested in. You can check out my github repo to see how I implemented it. Here's the run-down:

>if (process.env.NODE_ENV !== "production") { ... }
>In gulpfile, use browserify with envify/custom and pass {NODE_ENV: "development"}
>To compute smallest possible size (minified in production using NPM instead of browserify) str_replace process.env.NODE_ENV with "production"

You can see the final gulpfile here: github.com/stevendesu/minimux/blob/master/gulpfile.js

The output when this runs:

>[21:33:09] Using gulpfile /mnt/dev-code/stephaniebarnett/minimux/gulpfile.js
>[21:33:09] Starting 'lint'...
>[21:33:09] Finished 'lint' after 432 ms
>[21:33:09] Starting 'generate-npm-module'...
>[21:33:10] index.js 5.53 kB
>[21:33:10] index.min.js 525 B (gzipped)
>[21:33:10] Finished 'generate-npm-module' after 664 ms
>[21:33:10] Starting 'generate-browser-module'...
>[21:33:10] minimux.js 5.96 kB
>[21:33:10] minimux.min.js 1.03 kB (gzipped)
>[21:33:10] Finished 'generate-browser-module' after 237 ms
>[21:33:10] Starting 'default'...
>[21:33:10] Finished 'default' after 7.43 μs

* The goal of this mini-project is to develop some PHP classes
* that allow Magento product information to be displayed in several
* different formats (CSV, XML, and JSON). Each record should ONLY include
* the sku, product name, price, and short description.
*
* The CSV format must have a header row sku,name,price,short_description
*
* You are not allowed to use any of the built-in PHP encoding functions (i.e. json_encode, SimpleXML, etc)
*
* You will be connecting to a Magento store that sells personalized greeting cards.
* Be sure to use the SOAP V1 protocol.
* It will take more than 1 API call to retreive the neccessary product information
*
* Magento API docs: magentocommerce.com/api/soap/introduction.html
*
* There are 2 external files that are included into this script.
* 1. rez-lib.php - provided classes and interfaces
* 2. dev-lib.php - Where you should put any of your classes
*
* Feel free to email me if you have any questions


I'm just going to go work at McDonald's

CodeAcademy really popular or something?


I haven't used them in a year and now it takes forever to compile my code. It used to be fast.

This React course is kinda fun.

working on an textbox input that opens up a details div below it when focused.

The details div has controls in it and must not close if user blurs out of textbox and clicks inside it.

I've kind of achieved this sort of reliably with some custom js mumbojumbo, having added event listeners to textbox's blur and div's focusout events. Both check if document.activeelement is in either one.

Now, the only problem arises from this is when I have an element inside the detail div that removes itself after clicking on it. Active element is no longer inside the detail div when i'm checking for it.

Any ideas?

So is React just a method of organization?

I've noticed this a lot about modern frameworks. Everything seems to be created with the idea of several people working on a single project.

So you have OOP MVC stuff and now whatever this is I'm learning where JS is stored separately to fill in individual parts of a webpage.

Obviously it would be easier to just fill this shit in with javascript, but it would be uglier.

hopefully I find some neat perks with this other than "satisfies autism"

hey,
does anyone here have experience making offline map apps? what tools/packages/whatever would you suggest?
related to ^, would it be too ugly/slow to simply make mobile (android/ios) apps by running a http server in background and running a webview as frontend?

AFAIU, MVC is made so that you can separate concerns, so that you can concentrate/work in one thing at a time, and/or allow other people to work with you

>making offline map apps
Explain a little. Mapping software is massive and does a lot of complex math.
Aside from having the geolocation data of every city on Earth and comparing citie cords with Haversine at the most basic level to calculate distances, you still have several very large high resolution images of the entire globe that have to be stored.

Several GB of map images and at least a few million database entries. My US only one has over 100k entries I think.

I need to have a cool web dev project done by monday. I was thinking of making a music visualizer w/ soundcloud api, but that's been done a bunch of times.

Any neat ideas for a two day sprint?

Anyone else trying to get into a coding bootcamp?

I interview with MakerSquare on Wednesday

I live 20 mins away from SF and I'm neet. Validate me

I've met a guy who's been programming in Js for long enough that he was interviewed by Jeff Bezos. He was laid off and can't find a job.

I think it more has to do with the fact that a great majority of programmers will never be anything more than mediocre and they'd rather have a yung buck than a tired old man.

What is your programming experience like?

What interests you and what languages do you use?

Also how fast are you?

I can Javascript for days. Have about 2 years of professional mongo/express/node development in a startup environment so I can get a MVP up pretty easily. Also cool with the front end html/css/js/jquery and consuming apis/oauth isn't much of a problem.

I've taken a look at d3 and am into data visualization. I'm really just looking for a single page (even single feature) app that is pretty cool to use. I like moving parts and slick animations, and am interested in interacting with features -- moving on a map, minigames (maybe use phaser.io?).

I'd like to consume some sort of API but am not exactly sure of an idea anymore. TY for your interest btw.

there are actually lots of libraries for manipulating/rendering maps (say, map files from openstreetmaps). the problem I have is that I can't find info on what stack to use, how is the support for the different targets, etc, etc. also, libraries that are a few years old are buggy and/or restricted and/or simply useless, so there is a LOT of outdated info out there.

these days, most dev seems to be heavily oriented towards node.js (of course...), but I still can't find info on how to make a complete app. I found this yesterday: github.com/osm2vectortiles/offline-maps , but since I don't know much about node.js, I don't know how to make an app with this... I only have a few ideas, and I'm sort of "reverse-engineering" this program.

I've been trying to make a multiplatform map app that can read offline maps for years... and I'm completely lost. perhaps I should have made some android app and a website, or something, instead of trying to do everything at once.

I lack the knowledge/time to make libraries to manipulate/read these map files, so that's impossible for me.

I have a few ideas. 2 days though...
I would probably make a music visualizer with a lot of customizations.

Like take a text input, convert it, use it as the visualizer however you do it. Give options for font-type, colors, size, animations, and maybe some effects.

Twitch streamers would love you.

If that thing is what you're looking for then you should just learn node.
I do a lot of mapping stuff, but never anything offline with visuals like that. All I really know is that mapping stuff is expensive and if you ever find anything free it's usually years outdated because they want to sell you the newer stuff.

I like the idea of custom visualizations. I am curious though how it would benefit twitch streamers? Like a widget they can use? Thanks for the idea/support -- any other ideas are welcome as well :)

Node is pretty straightforward once you have a good Javascript foundation. Google 'node scotch io tutorials' and they have a ton of good stuff. I started node by learning user auth!

OBS has a tool called BrowserSource. It allows you to overlay websites into the "scene" by entering a URL.

The URL usually consists of GET looking vars the you regexp location.search to get the info from. You use this to generate their custom page.

It would help them because it would be pretty awesome for a closing scene to have their name look crazy to music.

>If that thing is what you're looking for then you should just learn node.
>Node is pretty straightforward once you have a good Javascript foundation. Google 'node scotch io tutorials' and they have a ton of good stuff. I started node by learning user auth!
I have a terrible JS foundation, but, as I said, I'm "reverse engineering" this node/electron program, and seems relatively easy (but quite the mess). I have yet to find the lib that renders the maps, though...

anyway, my original question was
>would it be too ugly/slow to simply make mobile (android/ios) apps by running a http server in background and running a webview as frontend?
because I already know (sort-of) how to run a map as a website (mbtile files from osm+tessera, as made in the electron app I linked above). but I wonder if I can make a multiplatform app in one shot easily with node

>I do a lot of mapping stuff, but never anything offline with visuals like that. All I really know is that mapping stuff is expensive and if you ever find anything free it's usually years outdated because they want to sell you the newer stuff.
take a look at openstreetmaps+mapbox:
wiki.openstreetmap.org/wiki/Frameworks
github.com/mapbox/tilelive

Thanks for the reply user. Sounds pretty cool desu. We'll see what ends up happening!

Is this confusing me because it's 2am or does this look strange?

var people = ['Rowe', 'Prevost', 'Gare'];

var peopleLIs = people.map(function(person){
return {person};
});


So I'm guessing *.map is like a while loop? How is it assigning the value to the function parameter?

Wait, is this the same as saying function(people.map[1]) ?

I kind of get it, this is just weird. I'm calling a function with a value, but I'm not specifically sending it as a parameter, it just automatically becomes the parameter by assumption. Is that it?

Just get a pi3 and host it yourself

It will iterate though the array and add tags to the values.

developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map

This is cool. Thanks.

Yes, it does.

just writing html tags in to your javascript doesn't compute.

Probably some react bullshit.

It's called JSX and it's being compiled.

and yes, it's definitely some react bullshit. It's fun though. A right good memen' time.

With ES6 javascript introducing template literals, JSX will not be as needed.

Oh god.

When can I use ES6 as standard?

3 years from now? Or right now with Babel.

Oh god this is sexy.

hnnng

I'm reading to see if babel would conflict with react. Not sure if it works that way but I would think it might.

Found this "plugin" or something for Babel
"Strip flow types and transform JSX into createElement calls."

Is JSX really that bad?

>Just a simple question: What do you use for font size?
>Em? Rem? Cm? Px? Pt? %?

Just learning this shit now, but why would I not use Px?

It doesn't scale properly with screen sizes/resolutions. Use `em` for proportional text, except in cases where you're designing for a 1024x768 geocities page.

my-first-socketio-app.herokuapp.com/#/

learned socket.io this morning, please come and leave a message in my first socketio app

thank you

sent ;)

I am a mathematics student and decent at scientific computing/programming but recently got offered a side job as a js web developer.
Should I do it?
Is web development hell?

just say yeah, give it a shot for a while, if it doesn't fuck up the rest of your shit too much

You can always learn something, right? And when something better comes up, jump ship.

You should be doing data science

someone help me plz, im a dumb dumb :^(

I wrote a start page for myself. basically it has several input forms to search on google and other engine.
I want the search field (input form named "InputGoogle") to be focused on on page load. I use javascript for that.

see pic related for my code (I couldn'tmake it in a post because 4chins thinks it's spam)

what can I do to not have to close a popup everytime I load the page AND to have the field have focus?
send help.

fuck, I obviously forgot to change the code that does not work.
in the second snippet, the alert is commented out. no other change.

also, InputGoogle is one of the many I have, here I use InputStartPage which of course exists. the problem doesn't come from that.

>When can I use ES6 as standard?
Right now if you only need to support modern browsers (or Node). You still need babel if you want to do newer stuff like ES7 object decomposition and whatnot.

>I'm reading to see if babel would conflict with react.
What do you mean, you need a transpiler to use JSX

>Is JSX really that bad?
...no?

Do you even know what JSX is?

So it seems that if I want to get a decent job in this world I need to be a coder/programmer. I have a friend with a Cambridge degree in history who couldn't find a job in his field so he is doing programming now.

I can't find work in my field (Physics) but I see a lot of PHP/Java(Script?) jobs advertised, both remote and on-site.

I have basic knowledge of HTML/CSS, haven't done it in a while but all that stuff was pretty easy. What's the best way to go about learning PHP + Java?

Also, what's the difference between Java and JavaScript, and could I also simultaneously be learning java for web and mobile development? Cause apps are all the rage nowadays...

Don't learn PHP.
JS ans Java are completely different languages.

take your time and figure things out, get your shit sorted. This thread is a good place to do that. Use all the resources posted in the OP, google shit, and ask questions. Some advice from a guy like you (worthless degree, trying to get into this as a way to make money):

-go into your preferred job search engine and do searches for several languages, take note of the ones most in demand. I'd say PHP is low on the list, up on top are javascript, java (lel they are different) and C#.

-different languages usually (but not always) imply different areas. You don't do front-end with C#, and you don't do back-end with javascript (there are exceptions, yes). Figure out what you want.

-So much terminology, it'll take you a while. SQL, MySQL? Java, Javascript, Node.js, React.js? C#, .NET, MVC? W T F!!

-do you want to do web development, software dev, big data, mobile apps? They're all different fields, some overlap but not much. Easiest one to break into is web dev, apparently.

-find your preferred learning method. Try different things out. Get a book (purchase or library, you wouldn't download a car, would you?), do some youtube vids, online coding schools like codecademy. You'll get frustrated at times, but keep pushing.

There's plenty of things I got wrong, I'm sure, but like I said, I'm a noob, no real experience, just learning atm to get a job hopefully early next year.

Lurk more on this thread, great info here all the time. And you can expect to go from 0 to employed in about 6 months, if you put in a good effort.

>Easiest one to break into is web dev, apparently.
Huh? Web dev is a complex topic, there are easier things.

alright, there you go, I have no idea what I'm talking about. But you mean easier things to actually get a job in? Like what? Something programming-related, mind you, not tech support. Would love to hear new ideas.

Any recommendations for a small CSS "framework" that handles default styles for buttons/forms etc? Just need something that makes it look nice without all the stuff (and look) of Bootstrap.

Oh, I meant that webdev is not easy, but it's easy to get a job in maybe.

Thanks. Yeah, I'm starting with bento, it seems to provide an easy-to-follow guide on what you need to learna nd links you to the relevant websites to learn it (such as codecademy).

>Get a book (purchase or library, you wouldn't download a car, would you?)
What book would you recommend? There's literally hundreds out there...

The jobs I see most posted are PHP, JS, Node JS, Angular, React...

I assume Node, Angular and React are all frameworks for JavaScript? Do you have to learn each individually for a long time, or once you have JS down, its easy to learn the complementary framework?

>PHP
where the fuck do you live? Here in the UK, there's 2k+ jobs for C# and javascript each, and about 200 for PHP. But yeah, if you feel like doing PHP...

all of those are javascript frameworks, yes. How easy it transfers I don't know, but it shouldn't be too bad.

For javascript, I'm following the book eloquentjavascript.net/, doing tons of exercises on Codewars.com, plus a whole bunch of other stuff. Some Udemy vids are ok, I guess.

Just a suggestion, if you get stuck with one particular resource, change method, go to another resource.

And check out gen.lib.rus.ec, there's tons of books there.

>where the fuck do you live?
I'm in Europe, looking for jobs everywhere.

I want to learn PHP because it seems like its something good to know in addition to JS.

Thanks for that book, bookmarked.

How applicable are those other programming books I see meme'd on Cred Forums? Like Tao of Programming and SICP? Read them after I've gotten my feet wet?

PHP may be good to get your foot in the door, but after that, it's better to transition into something else.
I've been working as a PHP dev for 3 years and it's rather apparent that salaries for PHP developers are 50%-80% of what a C#/Java dev makes. Not to mention that most jobs is maintaining some ancient systems that remember PHP4.

For someone who - till now - has been heavily invested in PHP and also has knowledge of JS - would you say I should dive into .net as well as asp or focus heavily on JS for the time being?

Coming from a c++/Java/etc background I find it kind of confusing reading this stuff

JavaScript is amazing in this way.

It's the hardest possible language I've ever read. I've written fucking Perl for years and it's far more easily understood than JavaScript.

Yet we have this persistent meme that it's a great easy language to get started on.

I don't know how the job market looks where you live, so you'd better just look at the amount of job postings.
As for JS, with the popularity of Node, you might as well go into front-end, as into back-end development, so if you don't want to learn a totally new language, going deeper into the JS "ecosystem" might be a good turn.

Literally easier to read than JavaScript.

I think you're not used to functional programming.

But you have "map" and "reduce" in Java, user..

>sitepoint.com/java-8-streams-filter-map-reduce/

Calling this "functional programming" is a JavaScript meme.

I work mostly in Erlang - an actually functional language.

github.com/ninenines/ranch/blob/master/src/ranch_tcp.erl

I can't make any sense of JavaScript.

What that guy posted is an example of FP in JS. JS supports functional programming, though it is a multi-paradigm language.

Full of C# and .net offers, PHP ones are a rare sight, JS is mostly attached to majority of those unless there's that one rare react or node offer.

Progress in JS world makes me sad.
JS is useful, but error-prone, so we invented linters. Linting is helpful, but it's not enough, so we invented TS. TS is OK and relatively widespread, but it is still JS, so we invented a dozens of compile-to-js languages, couple of which are actually good and production-ready.
I want to try something strict, but it feels like a trap now: doomed-to-succeed facebook-created ML-based Reason is not ready yet, Elm and PureScript are stricter-than-needed hard-as-haskell-to-learn and doomed to lose popularity in favor of Reason. It makes me sad and mad.

Do what I do. Learn all of the inner workings of the V8 engine so you understand weird quirks in JavaScript as well as how to use them to your advantage and become an expert of raw JS.

No matter how many tools or preprocessors are invented, they all ultimately output valid JS. Tools will grow in an out of favor, new pseudo-languages will come in and out of the lime light, but the core will remain.

Once you've mastered JS without any strict typing or linting tools, then you can use them as one-off helpers for particular projects instead of trying to rely on them as a long-term solution. I'm currently using TypeScript in one project, ES7 in another, and Coffeescript in a third. And it doesn't even matter.

I think the problem is the syntax. If the ES6 syntax was used it might have been a bit easier to read:
function rowheights (rows) {
return rows.map((row) => {
return row.reduce((max, cell) => {
return Math.max(max, cell.minHeight());
}, 0);
});
}
If the syntax was somehow enhanced again and the return keyword wasn't necessary anymore I think it'd be pretty readable, although you'd have to spend a bit more time learning it since it'd be farther from the C syntax.

Well I guess I'm studying a Web Dev module this year....

It's focused on ASP.net and Visual Studio as the IDE.

Who is this semen demon

Smirkfu [spoiler]Natalie Dormer[/spoiler]

Well, I've actually took part in a v8 development, so I know it relatively well. And of course I know ES standard, so I can already call myself an expert of raw JS. But for me it is not enough. I'm tired of a minor problems that would not exist with a proper typesystem.

ES6 is cancer
discuss

what's a good way to learn c#? Like user said, the demand for c# is incredible, but I can't find many good sources for it.

Looking for advice on naming library API endpoints

Pic attached is a rough overhead view of my library:

>1. Anyone can submit / dispatch / fire / publish an "action"
>2. Actions are passed through pre-middleware (may modify or discard the action, or even throw a new one)
>3. Internal state is modified according to a list of reducers
>4. Internal state is passed through post-middleware (may modify state, or throw new actions)
>5. Final state (after reducing and middleware) is saved and broadcast to anyone interested

There are four main API endpoints:

>Dispatch an action to modify state
>Bind a reducer to listen for actions
>Add middleware
>Request to be updated when state changes

My current working names were just the first things that came to mind: dispatch, listen, apply, and connect. (in order)

As I consider the architecture, it's like a modified pub/sub pattern, so I wonder if "dispatch" should be changed to "publish" and "connect" should be changed to "subscribe". I also think that "listen" being used for reducers and not state updates is a little bit counter-intuitive -- if I were "listening" to this library, I'd expect to be notified of state changes.

I'm considering instead using: dispatch / publish, bind, apply, listen / subscribe

I wanted to get people's opinions on these function names as well as expected return values and additional API considerations. For instance, if you want to UNbind a reducer, should it return a unique ID (like setTimeout), a function (which unbinds it), or an object with a ".unbind()" property?

What's the difference between ASP.NET, C# and Visual C#?

i wish javascript had regions so i could collapse all this stuff

make video games in unity
pirate an online course

//ES6
function rowheights (rows){
return rows.map(
(row) => row.reduce(
(max, cell) => Math.max(max, cell.minHeight()), 0
)
);
}

ASP.NET is Microsoft's idea of a web framework. It's slow, it's unintuitive, it barely works on mono, it's shit. Lots of companies use it because it's C# and they trust Microsoft.

C# is anything written with the language and could be .NET or mono depending on the target OS. For instance, FAP.NET is a C# web framework but is deliberately nothing like ASP and works on both mono and Windows.

Don't mind me shamelessly advertising..

//alternately
var rowheights =
(rows) =>
rows.map(
(row) => row.reduce(
(max, cell) => Math.max(max, cell.minHeight()), 0
)
);
}

var rowheights =
(rows) => rows.map(
(row) => row.reduce(
(max, cell) => Math.max(max, cell.minHeight()), 0
)
);

You guys are weird.
function rowheights (rows) {
let rowHeight = row => row.reduce(maxCellHeight, 0);
let maxCellHeight = (max, cell) => Math.max(max, cell.minHeight());

return rows.map(rowHeight);
}

yeah that's how I'd normally write it, i thought that nicca was tryin to code golf

It is weird even if you try to code golf. Note that readable is one line shorter than "terse" (I hope you understand that empty line should not be considered a line)

doesn't maxCellHeight have to be before rowHeight?

since maxCellHeight is a functional expression it doesn't get hoisted to the top of the function scope, or rather you can't reference an anonymous function that has been hoisted to the top of the function scope.

maxCellHeight is not hoisted, thus you can't use rowHeight before maxCellHeight binding or you'll get a reference error, but maxCellHeight is in scope of rowHeight nevertheless.

I hope these two snippets will make it more clear to you: es6fiddle.net/it7a42gy/ & es6fiddle.net/it7a4do9/

Is harmony aka ES6 worth learning? What's a good source, MDN?
Is it okay if I learn ES5 first and then learn new stuff from 6?

That's a feature of the IDE, not of the language.

VisualStudio was made by Microsoft, who also made TypeScript. So in order to push TypeScript on people they disable multiple features unless you use it. JavaScript development in Visual Studio is awful. Use Eclipse, SublimeText, or Cloud9 and you'll love it

>Is harmony aka ES6 worth learning?
Yes.
>What's a good source, MDN?
MDN is good. Reading ECMA-262 is also good.
>Is it okay if I learn ES5 first and then learn new stuff from 6?
It is actually the best way to learn JS in my opinion. New features like "classes" and "arrow functions" can hide the real behaviour of language from newbie.

Thanks.
Currently reading eloquent for ES5.

What do you mean WORTH LEARNING, it is already javascript and if don't know it you don't know javascript at all.

SUPER worth learning.

ES6 formalizes how modules are loaded meaning no more messing with CJS / AMD / UMD.

Arrow functions are not only slightly less typing, but they make some things WAY more intuitive:
>var doubledArray = array.map(x => 2*x);

Since constants are defined as immutable JIT compilers can make certain optimizations to improve code performance

Destructuring assignment GREATLY reduces the amount of code necessary in some cases, and makes library like Redux a breeze to work with

Promises make dealing with asynchronous callbacks no different from dealing with synchronous code -- a huge boon for the asynchronous javascript world

Date/Time formatting eliminates 90% of the use cases for large libraries like Moment.js

Classes give formal inheritance models so you can more easily design large-scale applications (think games and web apps)

String interpolation makes code so much prettier

Being a self-righteous asshole doesn't make you a good coder. You can know a language without knowing every obscure feature or function of it. Half of javascript developers don't know the difference between .bind() and .apply() - that doesn't mean they "don't know javascript"

Cool, thanks.
What's CJS/AMD/UMD?

CJS = CommonJS
AMD = Asynchronous Module Definition
UMD = Universal Module Definition

There are some good blog posts out there about JavaScript module patterns, but I can't seem to remember any specifics so I'll just give a quick run-down and let you do your own research if you're interested.

In the long-long ago (not that long ago), JavaScript was always global. If you made a "var x = 3" and you later made a "var x = 5", then the original value of x is gone forever and you can never recover it.

This was particularly bad when people started loading third-party code. Suppose I load two libraries and they each use a global variable called "$". Well, whichever I loaded first is officially gone from the global namespace and never to be seen again.

The first step towards fixing this was Immediately Invoked Function Expressions. These take all of your variables and get them out of the global scope. Unfortunately they didn't provide a good way to put things back IN to the global scope - meaning no one else could access or use your code.

Several libraries and tools emerged to fix this problem based on the module pattern. The first popular one was CommonJS. It created two global functions: define() and require(). By using these you could do something like "var $ = require('jQuery');" and if jQuery was ever "define'd" then it would load it and store it into $

CommonJS had one major problem for the web, though: it was synchronous. This meant the page sat there loading while it downloaded all of your modules. To fix this, AMD was invented. It worked the way browsers did (asynchronously) and was the father of RequireJS. However it was ugly and hard to use.

For the longest time if you wrote CommonJS code you could only use CommonJS libraries, and if you wrote AMD code you could only use AMD libraries. This discrepancy led to the invention of UMD. If a library were written with UMD then it could be loaded using EITHER CommonJS, AMD, or just put into a

>JS is cancer
FTFY
just look at this shit:

It's worth noting that NodeJS embraced CommonJS, and so it took off in popularity.

The ES6 module standard is partially based on CommonJS, partially based on AMD, and partially based on Python imports. Since it's a standard and not some random third-party code written by the community, you know it'll last. Tools like Browserify and Babel can be used to fix compatibility problems across the standards. If you write your code with 100% ES6 modules then you can import ES6, UMD, AMD, or CJS modules and after passing it through Browserify (with any necessary plugins like de-amdify) it will output a single javascript file that works as expected.

What are some basic shit I should know for a hackathon? I know HTML, CSS, JS. I was told to go with python for the api since java takes forever to setup. What do you think?

Asp.net is web framework, C# is (very good) programming language and most common .net language.

At a hackathon today. Give me your award winning ideas, /wdg/. I'm full stack, so any ideas are fine

Still seeking suggestions / opinions here.

My current thought is that binding reducers should be called ".on()" or ".when()" -- because intuitively you say "ON update the state" or "WHEN update the state". Example:

>On button click, increment the counter
>When button is clicked, increment the counter

If I went with ".on()" then I could copy jQuery for the unbinding API: ".off()" (I could also introduce ".one()")

I kind of like "dispatch" for actions. It mimics Redux and makes sense grammatically ("dispatch a button click")

As far as listening to state updates, I'm trying to imagine on people will use it. Something like:

>var subscription = onUpdate(callback); subscription.remove();
>var subscription = minimux.subscribe(callback); subscription.remove();
>onUpdate(callback); offUpdate(callback);
>bind(callback); unbind(callback);

I kind of like "bind" and "unbind". Not sure why. Just sounds nice.

> Being a self-righteous asshole doesn't make you a good coder
What the fuck are you talking about, yea i was a little exaggerating but my point is clear -- ES6 is not some test or experiment, it is js in current state and if you don't know what ES6 features then you know legacy of js not js itself.
And of course there is no use in knowing every obscure feature in language, but there is use in keeping up with constantly changing and improving environment.

ES6, in common speech, refers to a subset of the javascript language: the newest features that were recently added, but none of the old features. When someone says they "don't know ES6" they mean that they don't know arrow functions or promises -- they do NOT mean that they don't understand the javascript language (control statements, loops, conditionals, arithemetic operators, object literals, and all those other fun words)

You said "if don't know it you don't know javascript at all."

This is both factually incorrect (if you don't know it AT ALL then you wouldn't even know the basics) and seriously high-strung considering ES6 was finalized, what... June 2015? Lots of people have a job or go to school so they spend 8-12 hours a day, and besides that they have lives. Even if they're programmers they may use 20 different programming languages depending on what they're doing. You can't expect someone to research all of the newest features of one particular language and be well-acquainted with it only a year after it launched.

I code in everything from PHP to C++ to raw ASM on rare occasion depending on the needs of my project and what tools I'm using. I'm not going to read up on the changes to the x86 spec and the newest instructions added to the ISA every weekend when I could be watching Steven Universe or playing Skyrim.

I don't expect people to know the latest additions to the spec and neither should you unless telling people they don't know javascript makes you feel somehow superior to them.

>
>I have the opposite problem: I hand off a site to a client, put it into my portfolio, and then when I check the site a few months later they've hired some third party and fucked it all up. So then I have to hastily take if off my portfolio site, lest someone actually see it.
>I don't know how anyone can get around this, without a "Don't do anything to this site without my permission" clause in the contract, or simply hosting the site for the client.
Why didn't you take a screenshot / record a demo / archive the webpage?

Explain to your interviewers the situation and they'll understand.

If you host the site, make sure robots.txt is set so google doesn't pick it up and/or change the company name.

Another option is to check archive.org and see if they picked up a copy of the page when it was set to yours.

Focus on one core idea that you think is cool and take every shortcut you can to get there.

I recommend Meteor framework for hackathons. Shit is garbage for real world use, but for hackathons you can't beat the setup.

So my client company needs WYSIWYG, manages lots of sensitive data, and is trying to make their website fancier. What this means is some pages need to have large dynamic tables unpaginated so that the user knows it will all be saved at once.
I mentioned yesterday that I wish we were just manually modifying the DOM instead of using react. Someone shared two solutions- lazy rendering and more performant react clones.
Well, I've experimented with both now. The other libraries, even the biggest ones, just don't have the libraries we need. Lazy rendering just makes everything look like buggy garbage.
React just isn't cut out for industrial sized applications yet.

> C++
So if a man that knows cpp in c98 terms asking you "uhm, do i need to learn c14" what will you answer him? I will answer "go and learn it".
It is not about improving self esteem by telling them that you know something and they don't. It is about crushing peoples doubts, obvious if he want to improve then he need to learn it and faster he will realize it -- better.

>In the long-long ago (not that long ago), JavaScript was always global. If you made a "var x = 3" and you later made a "var x = 5", then the original value of x is gone forever and you can never recover it.
Since when is JS not global? Don't all scripts on a page occupy the same namespace?

even tomorrow i'll learn angular 2
odds tomorrow i'll continue with sock.io and create a game like agario

JavaScript has local scope. I'm new to Cred Forums so sorry for not properly using code blocks (I don't know how), but consider the following code:

var x = 3;
function a() {
var x = 5;
console.log(x);
}
a();
console.log(x);

The second console.log statement will display "3", even though it looks like we overwrote x with "5". This is because the "var" keyword created a locally scoped variable called x within the function. The moment you leave the function, x is gone.

Taking advantage of this, you can write code that doesn't put ANYTHING into the global namespace like so:

(function() {
// your code
})();

This runs all of your code inside of an anonymous function, then immediately runs that function. The problem is no one outside of this function has access to anything inside of this function. Any library written this way would be worthless because there's no public API for interacting with it. That's why you do something like this:

var myLib = (function() {
return { publicFunction: ... };
})();
myLib.publicFunction();

That idea got expanded upon even further and led to the creation of CommonJS and AMD. It's a pretty interesting tale if you can find a good post about it.

google 'javascript closures'

i don't know what happened but after installing xcode i literally have to use 'sudo' to do anything when i didn't have to before. especially when trying to add/commit with git or to even touch a file or mkdir.

help?

I know about function scope, what I was referring to is that global variables in one script are global in another.

You can enclosure script files.

What do you mean?

//foo.js
(function () {
var x = 1;
window.foo = x + 1;
})();

//bar.js
console.log(foo); // 2
console.log(x); // undefined

How the fuck do I git gud at Django?

My python and SQL are good, and I'm used to moving shitty data in and out of DBs, but so far I can't make sense of django. Every tutorial is just "put this here, now put this here etc.", it feels like I'm just parroting instructions rather than getting a feel for it.

How do I git good?

Javascript on Codecademy, fizzbuzz challenge. What am I doing wrong? I just can't find it.

Just look at every === sign. Don't you miss something?

>===
>count%===
>else with no brackets

Also semicolon at end of for loop.

I fell for bait in 2016

pro tip: dont ask these mongoloids OSX questions they are all php python retards that go out of their way to never ever learn anything new.

sudo chflags norestricted /usr/local && sudo chown $(whoami):admin /usr/local && sudo chown -R $(whoami):admin /usr/local


OR

Reboot into recovery mode (hold Command+R on reboot)
Access the Terminal from the dropdown menus.
Run csrutil disable
Reboot back into OSX

So I am going through Free Code Camp and currently working on the portfolio page.

I am wondering once I learn Javascript and build something with that, how much do I need to practice these languages before I should appply?

How do I achieve this (pic related) in flexbox, with all 4 the same size regardless of how much text there is, and with the link always at the bottom with no fixed height.

oh i almost forgot the version of GIT that comes with xcode developer tools is out of date and even if you download the correct version you have to change the default version:

sudo mv /usr/bin/git /usr/bin/git.xcode
sudo ln -s /usr/local/git/bin/git /usr/bin/git

some user was saying the whole thing, from beginning to end, zero knowledge to getting a job, takes about 6 months, but can be done in less.

I could see that. I guess when I feel confident in my projects I'll throw some applications out there.

fuck, thanks. I've been doing this Codecademy shit for hours now, maybe it's time to take a break.

min-height

I guess there's no timeframe, really. Since we are looking for that first job and have no degree, it's all about the portfolio. Start putting shit together, and when it starts to look decent, spam your CV like a motherfucker. Some days ago on /wdg/ some user posted an example from github of the shit he got hired for. It wasn't really that impressive at all.

So do you think I should host my portfolio on Github and my projects? I have some on codepen but I can't attach assets locally unless I have Codepen pro.

Also tried uploading my half done site to github and have no idea what I did.

that's the way to go, yeah. And put your portfolio link somewhere very visible on your CV, so that they are immediately prompted to check it out, even if they weren't requesting portfolios.

thanks user!

and if you want to do even more, get a Linkedin profile, make it nice and cool, and also link your portfolio in there. Throw in all the cool buzzwords you know, and don't be afraid to inflate the shit out of your knowledge. If you've completed the SQL course on Codecademy, just put you're proficient in SQL, what the fuck do they know?

as a noob, I find Javascript and C# to be very similar, even though people keep claiming they are completely different. I know C# needs every var type to be declared (int, float, double, etc) while JS doesn't give a shit, but other than that...

When do I get to the point where I start to see the differences?

well, they are similar in that they are both programming languages.

some of the syntax is the same, sure...

learn css?

>sign up for linkedin
>requires current job title/company

Yeah, let me go ahead and put a retail store in there so people I knew can see how shit I'm doing.

Once again, another thing for people with prior professional experience. Fuck everyone else, right?

>sign up for linkedin

it's not really necessary, but it is another resource for your job hunt. You can do without it, of course, you just have less chances of getting hired. Don't really know how much it affects you though.

I just put in "web developer" at "home"

It's trying to connect me with people I actually know.

How the fuck does it know that I know these people? I did not let it use my email.

oh forgot, also give the link container an order attribute

dive into js prototypes

>How the fuck does it know that I know these people? I did not let it use my email.

welcome to the botnet, my friend

Already closed the account.

It's not a network for people without prior experience.

someone reached out to me for a web dev job and I took them up on a phone interview even though I have no web dev experience.

I told them I had no experience but then they started asking me how to do web dev stuff and instead of just reiterating that i didn't know because i had no experience, i started mumbling buzzwords like "database" and "gui" and "front-end"

it was the most awkward experience of my life and i was sweating by the end of it. I'm pretty sure they think I'm retarded. Anyways, now I'm teaching myself the stuff and it doesn't seem so bad.

other people signed up and gave linkedin a list of contacts from their email accounts

Good way to include header and footers?

I'm not a fan of having open ended div tags for containers in several different documents and having my content pages end without closing body and html tags is odd.

when it's about changes always say:

"send me the list of changes and i'll tell you how much it is"

ALWAYS, they will understand, they didn't get a business runing by giving away their job

Testing

```
Testing
```

Testing

Testing

I'll figure this out, damnit

Testing?

Got it. Now which of these makes more sense for a state manager:

var sub = subscribe(callback); sub.remove();
var id = subscribe(callback); unsubscribe(id);
var rem = subscribe(callback); rem();
subscribe(callback); unsubscribe(callback);

var ptr = subscribe(callback); free(ptr);

I'd give credit to this answer as it's essentially identical to my second option, except by using "ptr" and "free" you demonstrated you're coming from a C/C++ world which isn't always compatible with how people think in JavaScript. Think higher level (objects and design patterns)

it was a dumb joke. I have no idea about conventions in JS, sorry.

What IDE/editor do you use.
I'm tired of vim. IDEA is too heavy and slow. Last time I tried Atom it was lagging clusterfuck of bugs. I have no idea what to use today for React development.

bump

For jobs/money:
ebookee.pro/pro-asp-net-core-mvc-6th-edition.html
For freelancing:
ebookee.pro/laravel-code-smart.html

How much time/resources is required to set up an ecommerce site with wordpress? I know jack shit about either but have some basic HTML/JS know-how

>how long does it take to make a website

>le Kramer playing cricket meme, ebin

it depends on what you want to sell, mate. If you're just selling potatoes, it shouldn't take you too long. I imagine the most difficult thing to set up would be a dynamic price index, to get the price of your commodity live and constantly update it.

You're fucked.

You couldn't even figure out woocommerce and wordpress as at that level.

For stupidity's sake, gonna go with manually set fixed prices

Bretty discouraging. What should I be relatively proficient in before attempting web shit?

How to get over a hate for HTML and CSS? I've been doing mostly Javascript and recently, React (also know PHP). A lot obviously ties into the front end stuff / html, so probably I should know a bit more about it.

I've been going through the front end program in Free Code Camp, and am now in the portfolio page part. And I still find I'm really slow and hate it.

I'm on the same thing man!

Just start building it. You could be finished in a day if you aren't doing anything interesting.

VSC

Any reason in particular why you hate HTML/CSS? I find it way easier than actual coding because there's almost no critical thinking involved

Im almost positive this idiot means js

Java != JavaScript

>ecommerce site with wordpress

Seriously, don't. Use stripe or build an Amazon store.

Since you're not going to listen and you're going to try and do this anyway, here are the PCI guidelines you're going to have to comply with:

pcisecuritystandards.org/document_library

How does this compare to redux?

It's not hard desu. Just use this security guide.

Didn't amazon kill their web stores? Good riddance if I'm remembering correctly. What a fucking mess managing those things were

>PCI compliance
He wouldn't be processing payments so it doesn't matter

>Does this work?
Refresh
>maybe this will?
Refresh
>no, maybe I need to display block?
Refresh
>inline?
Refresh
>google issue
Refresh

Not who you're talking to, but this is why I hate CSS. I've been using it for a decade and still don't get it.

If you have a store with a form that says "credit card goes here" it doesn't matter what happens next or who processes it, you're in for the full PCI assessment.

Man their legal department has their work cut out for them, with 99.9% of ecommerce sites on the web not giving a fuck about their rules

Do you do all your style from scratch? I assumed everyone just used bootstrap or something

Scratch.

Even with bootstrap you still have to style a lot.

Performance and memory usage wise I haven't done a benchmark yet to answer, although it's sufficiently simple that I imagine it has identical or better performance. There may be optimizations I could make though (like pre-allocating arrays to avoid garbage collection and memory thrashing) that I haven't even started to consider yet

The major difference is the API. I'm about to update the documentation with specific differences / examples, but here's a rundown:

>Despite the docs saying you should **never** call `createStore` more than once, nothing prevented it.
>Binding more than one reducer necessitated a strange "combining" function.
>Middleware was defined using a function which called a function which called a function.
>React-Redux required two functions for mapping state and actions separately, and introduced a `` component

I solved each of these problems:

>"createStore" is done internally and only one store exists -- internal to the library
>Reducers can be bound on-the-fly using a simple event listener pattern. Adding reducers after state initialization should be considered poor practice (as this puts some state in your reducer list) -- so in the future I may seek a way to prevent that
>My middleware definition is (action, next) => {} instead of store => next => action => {}
>React middleware can update any class-based component on state update. State is read directly by the component using getState

I'm willing to give it a try, the main middleware I'd need is something like redux-saga and something for websockets.

You should link this to the Reactiflux discord

Afraid I'm not super familiar with discord. Is it like IRC?

Currently the only middleware I've written is for easily connecting to React components (essentially the primary feature of React-Redux implemented as middleware)

I haven't used Redux enough to be familiar with all the common middleware or the more common middleware people use, although I wanted to help with Minimux adoption by including middleware with it that could be used via:

import { ... } from 'minimux/middleware';

I'll look into redux-saga (and probably redux-thunk since I've heard about it a LOT) and see if I can easily implement them

Just a quick note: I just pushed an update to the API about 10 minutes ago per some comments here:
reddit.com/r/javascript/comments/538wgm/suggestions_for_optimal_api_for_a_minimalist/

It's still backwards compatible with v1.0.0 but "connect" and "apply" are deprecated in favor of more intuitive endpoint names

What is a fool proof way to make sure a particular javascript and it's functions run last?

It's driving me up the fucking wall

Uh..example?

It goes from top to bottom unless you tell it otherwise.

I'm just putting the script all the way at the bottom of the document. But there's some other js in the body that still beats my script to the punch.

I don't get it.

Maybe a callback function.

I am still a noob not sure if that would help.

Can you guys help me out? I'm working on my first Java project to solve quadratic equations and I needed some advice on making %f work on some lines of my coding. Line 31 and 35 are killing me because I want the commas between each answer and all of it enclosed in parenthesis but when I do it along with %.5f I get errors unless I take the commas and parenthesis out. I thought maybe I just made this complicated for myself but just going straight in with the formulas instead of declaring them to some variables but even that isn't working out for me. So I left line 31 with only one decimal place instead of 5 like I wanted. At line 35, there's supposed to be two numbers separated by a comma but since the method I was trying with %.5f wasn't working out I just left it there with VerI and VerII. Usually I would get the "bad operand types for binary operator +++" so I assumed I just added too many + signs. Overall I can get my program to give me my desired answers but I can never format it the way I want them to be. I'll be on for a while so I respond back and post more screenshots or better explain my situation if needed. Thanks Cred Forums.

Wrong thread, buddy.

Thanks

pro tip:

put this in your css to confuse your visitors

body{
cursor: progress;
}

Need this for murica. One that isn't indeed or Craigslist

..out("Vertex: " + Ver1 + ", " + Ver2)

I have no idea how to interpret this

An if statement couldn't hurt

I always get this error.

Where is this from?


For future reference, when you don't know something type it into repl.it/languages/javascript (that's what I do)

That function takes in f (which itself is supposed to be a function and passes arg as it's argument.

If the function was addFive (which adds five to its argument) the result of addFive(5) and noisy(addFive())(5) are both 10.

Why not use Python?

The function noisy takes a function as input and returns a function that takes some other input and outputs the input after being run through the input function from noisy.
Boolean is a function that returns a new boolean based on the boolean value of the input

so noisy(Boolean)(0) returns Boolean(0) aka false

I was actually wrong about the addFive example. I have no clue how to do callbacks on that level

Can someone show me a Js function that does this?

I wouldn't mind it but I'm learning Java in school right now.

function add(n) {
return function(m) {
return n+m
}
}
Or in modern ES6 JS
let add = n => m => n+m

Sorry, I meant something that could chain indefinitely

>full stack
So you are not particularly good at anything specific?

codewars.com/kata/a-chain-adding-function/train/javascript

I could just click the solutions if I wanted, I'm more curious to see if anyone can solve it

>I could just click the solutions if I wanted
From what I remember about codewars, you can't see solutions until you've solved it, and it doesn't look like you've solved it.

Seems like you could just abuse valueOf

Hey I'm working on a image slide show thing. but I suck at CSS and was wondering if I could get some guidance.

I want to get one large div that will be the image and two dives at each side over the image like in pic related that will be used to click on to get to the next slide.

Yep, abuse valueOf

forgot my code lol.
#slide_show
{
background-color:gray;
width:auto;
height:100%;
display:flex;

}
#slide1
{
width:100%;
height:100%;
background-image: url("../img/slide1.jpg");

}
#slide2
{
width:0%;
height:100%;
background-image: url("../img/slide2.jpg");

}

#slid_container
{
display:flex;
width:100%;
height:100%;
background-color:gray;

}
#next_slide, #last_slide
{
opacity:.5;
width: 20px;
height:100%;
background-color:#353534;

}

Nvm I was able to deal.

how big would an object like this actually be? a couple dozen bytes or more like kilobytes?

i got some code from stackoverflow to figure it out, it would be roughly this much without keys

>numbers are 8 bytes each
>have object with 7 numbers
>need code to multiply 8 by 7

I made a lazy loading infinite scrolling tree grid library in angular. Here's to hoping they let me put it on my github and on bower/npm. The only thing that comes close is adapt strap, but mine handles large data sets and his doesn't without lagging to hell and back.

Anyone else work for a company who is super sensitive about the code you write for them?

yeah true but i don't really know how javascript works, it might have considered them strings for all i know

also, i doubt that the floats from the previous picture are 8 bytes

>it might have considered them strings for all i know
That's retarded
>also, i doubt that the floats from the previous picture are 8 bytes
They are. All number types in javascript are 8 bytes.

dice

Indeed is ok, but you should really find the recruiter companies that post there and pester their emails from their homepage with your resume and, most importantly, your portfolio.

You can choose to view solutions and forfeit your ability to earn points on the challenge.

So are you trying to get someone to show you their solution so you don't have to forfeit the challenge?

If so, here. You're only cheating yourself out of anything.

Apparently % is format keyworld. Learn to escape it in one place and use it in another place instead of string concatting.

Put everything into Window.onload

that all es6?

That changes things because I have no idea what the fuck is going on there but it sure looks sexy.

>that all es6?
it's es6 closures but it can be easily converted into es5

function add(n) {
function fn(m) {
return add(n+m)
}
fn.valueOf = function() {
return n
}
return fn
}

Good god that's a jump.

Is there supposed to be zero semicolons? I'm seeing python in the first example for probably that reason specifically.

I'm off to learn these closures. Anything else important in ES6 I should look at?

guys i made my first shitty site and trying to finish it roast me nisanbahce.com

>Hakki + lletisi
w/e link not working
>hr
as styling is wrong + no color
>menu elements after logo
its to old to be used, most people are used to the stupid left logo, right menu layout
>pure picture slider
outdated, give it some text/info at least
> he again
> footer uneven with the container above
go fix the width, and fix the padding in it (top & bottom)

>ürün link
>padding in picture boxes
remove it
>box to big
for to less Info in it, you could do everything in a cube box and just have a black bar in it with its Name which are a hyperlink + the icon
>click not working
>not found document
>responsive a shit on all elements
work more with width % and %-based sizes
> © not showing on all pages
> logo uses green yet it isn't used once

and this was w/o looking into the css

>Navbar is lazy. Alignment is all fucked up.
>navbar dropdown is poorly aligned
>Banner shouldn't be there, should be replaced with the gallery scroll below it, assuming you have high enough res images.
>font family is shit
>footer has no styling so it doesn't look important. It's also aligned bad.

Seriously, get rid of that banner, it's breaking everything.

the navigation isn't working and it looks meh as soon as you start scrolling

Add :hover to the navbar
It breaks when you decrease the browser window to mobile size
The footer is ugly.

For the rest it looks pretty decent.

Also an SEO tip: Google doesn't use keywords for it's search engine.
But adding so many keywords as metadata is a spam signal. You should consider removing some.

While the page description should be a bit longer.

I'm a drupal dev making hot $$$, but Drupal 8 is just terrible, except for headless projects, which my agency won't get because we are too small. Should I stick with Drupal for more job security or just jump on the memescript bandwagon?

no idea. But tell me about drupal, how hard is it to pick up, how similar it is to other languages, how easy it is to get a job with it?

It's not hard if you are good at PHP. Drupal 7 has it's own twisted way to solve everything, so when 8 introduced new stuff for example twig templates, the majority of the devs working on contrib modules sticked to the old way of doing things, ignoring all the benefits of the new additions. The current state is a huge mess, but just the reputation of the CMS is enough to sell it for a high price.

Is it bad practice to turn style.css files into php?

css files are so primitive.

Any reason as to why you'd do that?
I only did that once myself when I implemented an option for admin to change the colors of the different elements in a CMS.

What?