/wdg/ - Web Development General

Weekends are slow

>Previous Thread
>Getting started
Get a good understanding of HTML, CSS and JavaScript.
MDN web docs offer a good intro (independent of your browser choice)
developer.mozilla.org/en-US/docs/Learn

>Free online courses
codecademy.com/
freecodecamp.com/
bento.io/

>Roadmap
github.com/kamranahmedse/developer-roadmap

>Resources
developer.mozilla.org/en-US/docs/Web - General documentation for HTML, CSS & JavaScript
stackoverflow.com/ - Developers asking questions and helping each other
caniuse.com/ - Check browser support for front-end web technologies

>Youtube channels
youtube.com/user/TechGuyWeb - Traversy Media
youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ - freeCodeCamp
youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q - funfunfunction
youtube.com/derekbanas

>in-depth comparison of VPS hosts
webstack.de/blog/e/cloud-hosting-provider-comparison-2017/

Other urls found in this thread:

medium.com/@dwalsh.sdlr/react-facebook-and-the-revokable-patent-license-why-its-a-paper-25c40c50b562
medium.com/@ji/the-react-license-for-founders-and-ctos-b38d2538f3e5
preactjs.com/
laracasts.com/series/php-for-beginners
phptherightway.com/
youtube.com/watch?v=DobrRgD5aOU
udemy.com/javaspring/
spring.io/guides
docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/DispatcherServlet.html
docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-servlet
jsfiddle.net/07Ljh8yb/
jsfiddle.net/zn3tos3a/
twitter.com/NSFWRedditImage

I'm a professional web developer making wildly more than I deserve two years out of college. I spend most my day doing japanese vocab flash cards or playing chess, I probably average two hours of actual work a day.

Despite sounding great it's actually kinda depressing being so bored all the time, often drink (spike my coffee) to get through the day. AMA.

Have you considered like... Going outside once in a while instead of creating these fantasies inside your head?

to be clear, is your thesis here that someone bored with a high salary web dev position couldn't possibly exist, or the weaker assertion that no one fitting that description is posting in /wdg/?

so you actually have hours every day to work on any potential projects that interest you and you tell us, that you are bored?
Whats the story here.

So no proof? Ok.

I have a lot of free time but it's pretty fragmented, people pop in to ask me questions all the time. I do work on hobby projects sometimes but it's hard to do anything that requires continuous concentration because like 30 minutes is pretty much the upper bound how long a task can be. It was great when I was doing sprite sheets for a little game I was working on, stuff like that, but the kinds of things you can do patchwise like that isn't super interesting to start with.

Neither did you ask for proof nor did you answer my question.

How does mobx compare to redux? I'm very familiar with redux and i guess it's alright. But i hear mobx is better. Read the docs and it' seems complicated af.

So HTML5 is fucked, right lads? I mean nobody uses any of that shit; I've never seen any of it before.

Anyone else scared of the React license? I wanted to learn a js based framework but I guess I have to go with Angular now.

What's taking you so long with that proof?

The react fears are entirely unsubstantial.
Angular is great though.
HTML5 > HTMLX™

I am currently working at a place that started off like this.

Our entire management team kept fighting amongst themselves and never decided on projects or requirements so we sat on our hands all day for months.
Now a bunch of the managers quit, and we have nothing to show. They're blaming us developers for being lazy and punished us by taking away our offices and yearly bonus.

Dependency tracked computed vars are nice. If you work with redux for long you end up writing essentially the same code anyway. State containers are all pretty damn simple, there is no need for as much competition in that space as there is.

On principle yes, patent mud slinging is bullshit, but I don't own patents and never will so it will never effect me directly.

>They're blaming us developers for being lazy and punished us by taking away our offices and yearly bonus.
Fuck dude, that's shitty. Where I'm at all the devs are under one general org and get rented out to projects. The downside is we're pretty poor so getting equipment or the fridge stocked is a battle but at least we're protected from corp politics like you've got since out fates aren't tied to particular projects.

>They're blaming us developers for being lazy and punished us by taking away our offices and yearly bonus.
They're right though.

Should I be subscribing to my observables in the component or service in an Angular 2/4 application? As far as I know components are the views and services are controllers in the MVC pattern, right?

it's great

>Read the docs and it' seems complicated af.
not really. it's basically just @observer, @observable, @computed and reaction()

what? this website uses html5

no
medium.com/@dwalsh.sdlr/react-facebook-and-the-revokable-patent-license-why-its-a-paper-25c40c50b562
medium.com/@ji/the-react-license-for-founders-and-ctos-b38d2538f3e5

what's the easiest Python web framework to work with? I pretty much have 0 web experience (all I've done is Android and some Python)

django due to being this sort of "all in one" solution

learn react but use preact instead preactjs.com/
same thing but faster and MIT licensed and there are companies using it in production already

I wanna make forums, blogs and shit that talks to a database on the server. PHP is apparently old and stupid though. What else besides PHP should I use for talk-to-a-database shit?

Got an interview for a php dev, I'm pretty much all JS/C#/Python. How do I learn this ugly language in a week senpaitachi?

Being old isn't really a con. Use whatever, it's just a blog.

Don't think of it like MVC.

Components can subscribe to observables but they should be passed in (injected, whatever) somehow, services can be a good way of doing that. The thing you're going for is a component that can be subscribed to any observable that has an appropriate structure rather than writing a new component for each observable instance of a thing.

Opinion on web.py boys?

Django and Rails are kinda the apex predators for classical CRUD apps like blogs/forums/web forms.

I prefer flask but the differences between flask and web.py are pretty minimal.

Both are really cool super simple ways to put up a web service with a minimum of of bureaucratic bullshit relative to Django. If you're doing something small they're great. As an application starts to expand though you end up rewriting a lot of the stuff that comes with django, and wanting its structural elements (app divisions, modular routing, etc). Also if you have a db you're probably using SQLAlchemy which hasn't aged all that well.

Java
JavaScript
TypeScript
Kotlin
Python
Elixir
Ruby
Go
Scala
C#

this guy is retard

Is this a good pattern?

//Service
@Injectable()
export class ItemService {
items: FirebaseListObservable;
constructor(private db: AngularFireDatabase) {
this.items= db.list('/items');
}
getItems(): FirebaseListObservable {
return this.items;
}
}


//Component
export class ItemsComponent implements OnInit {

items;

constructor(private itemService: ItemService) { }

ngOnInit(): void {
this.getItems()
}

getItems(): void {
this.itemService.getItems().subscribe( items => {
this.items = items;
});
}

}


Is there a way to not use the constructor in the service? I can't reference the dependency db outside of it.

flask

>Is this a good pattern?
Yeah, this looks entirely reasonable. The important thing is that `itemService` comes in on the constructor so you could pass in another provider of items if you needed to. Naming something `getItems()` and returning nothing does seem a little odd but that's just style.

>Is there a way to not use the constructor in the service? I can't reference the dependency db outside of it.
Not that I'm aware of, it seems to be the recommended way of accessing services from other services.

wow nice arguments, you sure convinced me

>
wrong quote

wat

If your job consists on editing Joomla or Magento websites or Wordpress themes, run.
Otherwise:
laracasts.com/series/php-for-beginners
phptherightway.com/

you're a retard that's what

who is quoting who

well played sir i got a good chuckle out of that one

I'm not a retard I'm certified at 140 iq

can any of you guys give me some directions on where to learn some spring? ive looked at the docs but they are confusing as fuck

youtube.com/watch?v=DobrRgD5aOU

udemy.com/javaspring/

also spring.io/guides

The spring docs really are trash. I don't have anything better to suggest, but wanted to say it's not just you.

what? they're one of the best and most comprehensive I've seen

Read this
docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/servlet/DispatcherServlet.html

It's some of the most opaque public documentation I've ever read. Comprehensive doesn't mean much if you can't understand what's actually being said. Some gems from that page:

>This servlet is very flexible: It can be used with just about any workflow, with the installation of the appropriate adapter classes.
>It is based around a JavaBeans configuration mechanism. (but we're going to to tell you what it actually is)
>It can use any HandlerAdapter; this allows for using any handler interface. (this doesn't even make sense in java moon speak)


>The dispatcher's exception resolution strategy can be specified via a HandlerExceptionResolver...
>Its view resolution strategy can be specified via a ViewResolver implementation...
>If a View or view name is not supplied by the user, then the configured RequestToViewNameTranslator...

like 10 more bullet points of this is a great example of Spring's fundamental issue: it tried so hard to be configurable and always delegate work to some IoC component that almost nothing in spring actually fucking doesn't anything. The majority of the framework is just components that glue together two or more subcomponents so finding where actual behavior lives requires reading tea leaves or something

looks pretty flawless to me given that it's from javadoc

here's where you should actually start
docs.spring.io/spring/docs/current/spring-framework-reference/html/mvc.html#mvc-servlet

Is doing this considered bad practice? I need an http server that is just a part of a bigger service so I created the server as an object

from bottle import route, run
class channelserver:
def __init__(self):
run(host='localhost', port=10001)

@route('/')
def index():
return "Hello!"

What's the CSS property that makes an element not take up space so that other elements can be on top of it? I want to have text on top of a background image but I need to use an img tag not a background-image css property

>Is doing this considered bad practice?
Yes, @route creates a route within an implicit global app. Making two instances of that class won't do what you want it to. You can do something like:

def make_app():
app = bottle.Bottle()

@app.route('/')
def index():
return 'Hello!'

return app


instead. Also the index route will do strange things because the decorator will see an unbound method and any instance you make will have a bound version.

>What's the CSS property that makes an element not take up space so that other elements can be on top of it?
position: absolute

jsfiddle.net/07Ljh8yb/

>tfw too much of a pajeet to like Nodejs

Holy fuck I just tried to code in another language I learned when I first started and realized I've forgotten literally all the syntax.

Javascript will be the end of me.

New to web dev/ programming in general. Would a pajeet like to be my mentor? I'm making a web app and don't know if I'm using the best practices.

>looking for a wordpress developer
eh okay
>that knows how to use photoshop slicing to create css
ehhh okaaay
>must have university level of thinking, finished a study and three years of experience in this direction
In which university study do they teach you to use Photoshop to make Wordpress themes again?
>you will work in a team with 15 developers
ok cool, let's see what kind of business it is
>catering company
alright

Don't worry about best practices
If you're starting off just focus on doing things and then worry about best practices when you're comfortable with syntax and programming logic.

> 15 fucking developers for a catering company
Jesus fuck what do they do all day?

Probably eating sandwiches.

They did mention magento is it hard or just bullshit?

ASP

any online classes you would suggest for a NEET to improve themselves?

I have been hacking little things together forever but never tried to actually learn anything. I saw a class on react starting soon so I figured I may take that but I dont want to just dive in without getting at least some feedback.

I know basic stuff like python scripting and I know my way around a linux machine enough to deploy a server etc. Basically I can hack things together but I dont really "know" anything.

I can't recommend the udemy "web developers boot camp" enough. It's like $10, but 41+ hours of lectures and videos. It's a really good comprehensive course for beginners

thank you so much. I will sincerely look into this.

Post yfw WebAssembly kicks the door to the internet in and stomps its nuts

Is it just me or is learning online a lot easier than learning through books?

I feel information from books is much harder to replicate and has a lot less depth.

Not to mention books are more often outdated.

I've also had good experiences with maximilian schwarzmuller's courses on udemy for front end frameworks, going over angular 4 and vue, if you want to learn those

im going to buy this right now. Hope its good!

I bought it too lets be study buddies

I've been doing it for a few weeks, and I can say it is fucking excellent. The instructor is very good at what he does and how he teaches.

Hopefully you're paying $10 and not $200 though

that's the trick with udemy - their business model is to almost always have courses on sale.

I also just got the course. I considered getting a book this morning for 45 euro, so I might as well get 2 courses for 20 instead.

>preact
my mind reads this as pajeet react lol... how fast do they update their cloned project? is there preact natvie for mobile development?

How do I get the username of the logged in user on a page in wordpress? I used Theme My Login Settings to log in. I need the username to get stuff from a db that's connected to the logged in user.

this gives me hope. hopefully this is worth $10. i dont even want a job i am fine being a NEET i just want something to make me value myself some small amount before i inevitably take my life

dude, why the fuck do you ask such questions in here? wordpress has great documentation + there is also goolag/stackoverflow

or you could just open the theme, find one location where the username is present and fild the theme part that renders it and view the fucking source code.

pajeet just wants you to do his job for him is all user

What is a good domain registrar? After all the shit from GoDaddy and recently CloudFlare and NameCheap, are there any reliable registrars? How do I know I won't get my site taken down just because some people don't like it?

I'd like to know this too... I would like to move my 20+ domains from ((( namecheap ))) before july next year

no more sheckels from me for businesses who dont respect freedom of speech

>How do I know I won't get my site taken down just because some people don't like it?
Well, chances are you can't prevent that from happening. But it helps to use a registrar in a country with proper regulations (aka not the USA).

A popular one is Gandi (but do note their whois protection still shows your name).

Thanks.

Thing is I'm sure many have ToS saying they can terminate for any reason.

Does anyone here have hiring experience? What do you guys look for?

right now we are looking for blacks and females, to make the company more diverse.

so, if you're a white male, asian, jew... good luck finding a job.

What do you use to test the responsive design of a local website?

What's would be the best way to:
>chaining a bunch of API calls to a server
>bundle the data to a single json file
>store/upload the json file to another server for data extraction
and do so in an automated matter, given that the json file should be updated at least daily.

I suggest you to investigate about best practices, and the pros and cons

What is the best resource available to with tests, quizzes and other study materials on more complex facets of javascript? I already know all the basics but would like to understand how to write it all in the most efficient way possible. Listening to lectures / watching videos isn't enough for the concepts to sink in, I need to be tested

chrome dev tools and a couple of phone I have lying around

>bundle the data to a single json file
Take a list of actions and args for each as params, them delegate to controllers based on the set of actions specified, then structure the set of results from each controller into an object.

>store/upload the json file to another server for data extraction
This is almost certainly a bad idea. Even the time to do IPC and shuffle a file to some other server is almost certainly higher than just serving the damn thing to the client once generated. But you'll probably do something a lot slower like HTTP. So don't do that. If there's really enough data/load to make the scheme faster than just responding with the data then you should probably be using a binary encoding.

is Selenium really the best web testing tool avaliable? it seems the devs have almost abandoned the project and most of the tutorials i'm finding are done by pajeets 2 years ago

anyone here used it?

You probably shouldn't upload physical files.
Write a service that takes a string and does JSON.parse on it.

If you have access to the API server, you should probably write a service to do all the calls in one go. You're eating a bunch of time on handshaking if you make them one by one.

If the call is going out to multiple servers and you need a response from them all, you can instead use a Promise. all() to send the calls at the same time instead of one by one.

Then append . then() to parse the data, and send out the JSON. stringify the object.

As for automating it, that's really tricky.
You can't make a daily call if the user isn't logging in daily. I mean maybe a service worker could work, but I hear browser support isn't that great. Another thing you could try is writing a cookie with the timestamp of the next day and check if the time has passed either at login or on a setInterval, but again this requires the user to be log in.

>serving the damn thing to the client once generated
I know, the problem is a kind of badly structured API with individual endpoints. The objects I need to fetch from the server are stored individually, from id 1 to id ~100. I need to output a list of all the objects by reducing all these API calls to a single call. The second caveat is that the objects are updated regularly, hence the convoluted sequence of: do 100~ requests –> store into single object –> when the user outputs the list, it fetches the single bundled object/json file –> somehow schedule steps 1 and to keep the file updated. My last resort was to keep the bundled list in a google spreadsheet or something, but I am not allowed to use third-party services, besides I'd still be forced to run a script manually to generate a single object.

Making some sites for companies. "Landing page" and "About".

It's done swiftly, but I'm having serious problems writing the "about" text.
I'm getting STUCK!

I simple can't come up with anything great, and I dislike writing it - a lot.

Anyone got some good templates for this stuff?

Etc, "Company X has a wide ranging experience in the field of Y, for over Z years we have developed our blah blah blah"


I'm looking for a truckload of filler stuff like that ^^^^^

What kind of web testing are you doing with it?

I've never used Selenium.
I've heard of it, but only have a vague idea of what it does.

whodat

ok, i think my question is appropriate for this thread because it is about Electron, which is basically web dev
I have api which will give one random video every time you request
Now i want to watch it with electron
My question is how can i make player reload and play new video(reload and call api again) when i click on Next button?
Im not really into js so currently what i did to load new video is just refresh page on click.
This is how i get video video from api and use it html
jsfiddle.net/zn3tos3a/

I pasted it on jsfiddle because i get connection error when i add tags in reply

>I know, the problem is a kind of badly structured API with individual endpoints. The objects I need to fetch from the server are stored individually, from id 1 to id ~100.
This isn't kind of bad.
It's really bad.

If your end point is
/memes/{id}

Just add an end point to return all the ids at
/memes

Or if you only need a subset add URL params
/memes?start={start}&end={end}

If I understand correctly you want to modify a user's file to 'keep it up to date'?
That's also a terrible thing to do, and won't likely be possible. If the browser could just update a user's files, then there'd be nothing stopping someone from injecting malicious code into that file or read other files by lying about what file they actually want to read.

The best you can do is serve a new file every time and have an upload button to let them resync. It's pretty trivial, just Google downloading JSON object as a file.

How are the events structured in electron? I haven't used it myself but I would simply create a click event for your desired button and call loadData() from there. This should load a new video source and if you're lucky, reset the player.