Previous thread: >>68142149

Previous thread: >COMPLETE BEGINNERS GUIDE
github.com/kamranahmedse/developer-roadmap

>Free beginner resources to get started
Get a good understanding of HTML, CSS and JavaScript.
developer.mozilla.org/en-US/docs/Learn - a good introduction (independent of your browser choice)
freecodecamp.org
codecademy.com
hackr.io

>Further resources
developer.mozilla.org/en-US/docs/Web - excellent documentation for HTML, CSS & JS
github.com/kamranahmedse/developer-roadmap - Frontend+Backend learner-path suggestions
youtube.com/watch?v=Zftx68K-1D4

jsfiddle.net - Use this and post a link, if you need help with your HTML/CSS/JS
3v4l.org/ - Use this and post a link, if you need help with PHP/HackLang

>PHP resources
pastebin.com/gfBPg24A

Attached: wdg.png (822x552, 814K)

Other urls found in this thread:

pastebin.com/gfBPg24A
paragonie.com/blog/2016/02/how-safely-store-password-in-2016
paragonie.com/blog/2015/05/preventing-sql-injection-in-php-applications-easy-and-definitive-guide
paragonie.com/blog/2017/12/2018-guide-building-secure-php-software
reddit.com/r/recruitinghell/comments/9psy7h/web_developer_so_they_want_me_to_build_them_a_web/
pastebin.com/ycCnStf0
akrabat.com/standalone-doctrine-migrations-redux/
masterzendframework.com/zend-expressive-or-laravel/
masterzendframework.com/tutorial/zendframework2-hydrators-models-tablegateway-pattern/
php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface
github.com/DASPRiD/container-interop-doctrine/pull/31
php.net/manual/en/class.infiniteiterator.php
php.net/manual/en/funcref.php
github.com/phpbrew/phpbrew/raw/master/phpbrew
github.com/phpbrew/phpbrew/wiki/Quick-Start
getcomposer.org/doc/00-intro.md#installation-linux-unix-macos
mariadb.org/download/
digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04
secure.php.net/manual/en/extensions.membership.php
twitter.com/NSFWRedditImage

I love taking it up the ass edition.

I'm a webdev noob and I read through all Vue/Vuex docs. Is it just me or does Vue have a lot of ways to solve every problem?

For some reason that's the impression I kept getting. It seems like I encountered too many things along the lines of "for this special case you use this you can write this in this different way", "to save this small bit of boilerplate there's a different syntax (or a helper)", and stuff like that.

Am I alone in thinking this?

I make $28 per hour 40 hours per week copy pasting small business text and uploading .jpgs into already up and working wordpress template sites.

I only do about 3 hours of actual work per day and shitpost the rest of the time. I have no idea how to use js in any way. not even kidding

u mad?

not really, sounds comfy

>copy pasting small business text and uploading .jpgs into already up and working wordpress template sites
no
>I make $28 per hour 40 hours per week
yes

just geolocated you and told your boss i'll do the same job for $25/hr

is ubuntu distro good for web developing?

Is there a way I can manually link to my SSL certificate in the apache config files? I cannot for the life of me get certbot to run properly.

Sorry for the blog and the rant but I need to vent it out, and maybe someone here was on a similar situation.
I think I'm not good enough.
I lost my job and I feel clueless right now. I've gone through the motions all my life but now I need to get in charge.
I really want to work as a web dev but I'm not sure if I'm capable of learning that on my own even though I show myself as strong and determined in front of everyone.

you forgot the thread subject

Anons, please, wtf am I doing wrong here? It says the error is in line 10 but I've used the same shit before and it didn't end up like this

Attached: tf.png (1158x790, 53K)

stop right there and start over.
what you're doing here shouldn't be done this way anymore. this looks like from 20 years ago and even then it was bad.

disclaimer: I haven't used PHP for like 15 years anymore, so not everything might be correct.

you select username but try to access 'user' in your $array.

also:
don't echo if you set a header, you cannot set headers after you've already output something.
instead of echoing all your shit learn how to debug properly so you can set breakpoints and step through your code to see what it does.

>stop right there and start over.
I'll in the future, but for now I need results for tonight, independing on the quality of the code.

>you select username but try to access 'user' in your $array.
THANK YOU user, you saved me with that shit, I'm fucking retarded, hoooly

>don't echo if you set a header, you cannot set headers after you've already output something.
I've noticed that, I was changing to js location shit.

>instead of echoing all your shit learn how to debug properly so you can set breakpoints and step through your code to see what it does.
I'll senpai, I'll. Thank you very much

don't use md5

It's just for a little base code, not something huge. But thanks for the adv anyway user

why did u lose your job? did u get laid off / fired / contract ended? will make a difference as you move on

This isn't 2003. Please stop now and reconsider things.

Fired.

i just geolocated your geolocation and offered my services for $24/hr

>find what isn't wrong with my code

answering php questions uwu

HOLY FUCK, PLEASE STOP
i don't usually say this, but stop using php, i mean node is great right ? you can also use .net, python and other things, just leave php

Do you recommend books or videos for a newbie?
I've fucked around JS and PHP but I have no coding background.

check this : pastebin.com/gfBPg24A
also : symfonycasts.com
i'm not a big fan of tech related books, so i don't have anything to offer.

lmao

lmao

>try to set up database connection in various ways
>nothing worked
>database was empty
>check database tables
>it's full with some pre-built table names that allows a quick start

looks like at least some of it worked, ffs

joke aside; that code is trash.

here read those security tips by scott :
password hashing : paragonie.com/blog/2016/02/how-safely-store-password-in-2016
sql injection : paragonie.com/blog/2015/05/preventing-sql-injection-in-php-applications-easy-and-definitive-guide
everything else : paragonie.com/blog/2017/12/2018-guide-building-secure-php-software
i hope you improve your shit kiddo.

Look in to code splitting & dynamic imports, create-react-app already has this configured

Also later look in to prerendered static react sites like Gatsby & react-static

the best thing you can do is start freelancing/school immediately to plug the hole in your resume that you've created, since you won't want to list that job anymore. if you got fired from a non webdev job and are trying to switch over, they won't really care about your job history as much just your portfolio

Attached: php.png (1305x4191, 575K)

Code like this is why people think PHP is shit.

ik !
ayyy, could you please redo it form me ? c: adding symfonycasts.con as paid and free videos also, add this articles from in a security section ?

also, in the frameworks list, that's not swoole its EasySwoole, a framework built on top of swoole extension

>tfw interning as a webdev for no pay and they make me do mobile development using react-native
>other devs only have to work on the websites and can't help me
>given 1 week to build app by friday
>can't even set up local environment
>completely broke cms mobile app builder thing they use because I updated react and pushed it(I think I literally did nothing else)
>deleted their draft on accident
>did almost 0 react-native code in 3 days because I can't even see what the code does without a simulator
>slept a total of 6 hours in 3 days
>also have presentations and projects due for classes
>vomiting because of stress (not even joking)
>gonna get fired before even getting paid

why

Attached: sad_reindeer.png (1500x814, 1.6M)

update the pastebin and post it here and I'll create the new image

Why? Here's why:
>tfw interning as a webdev for no pay
>interning
>for no pay
You're being used as slave labor, you're literally below Pajeet because Pajeet gets paid a dollar.

reddit.com/r/recruitinghell/comments/9psy7h/web_developer_so_they_want_me_to_build_them_a_web/

literally this

I was actually supposed to get paid a while ago. I was supposed to be in training for 6 weeks and then paid, but now it's been 3 months and I'm still not paid. My boss hasn't been in the office for about a month and he came back last week and told me about this.

But anyway I decided to just use regular react-native (which works). I was supposed to use react-native with this builder cms thing from some company they work with, but it's impossible to get it to run without breaking. Maybe I can just build the app, show it to them and then say "btw this isn't built with your shitty builder thing because it doesn't work".

The fuck are you doing? I hope you have a contract with all this or at least mail conversations. Talk to your boss first thing in the morning and if he's being vague or coming with excuses then consult with a lawyer right away.

pastebin.com/ycCnStf0

I'm just a pussy. I'm a student and this is my first internship. There's only 3 other developers who are also students and they barely get paid. The lead dev was only given 4 hours a week and the reasoning was that there's not enough money to pay everyone. 2 of them will be graduating and if I get hours I'll be taking from them. I just feel bad because they helped me a lot with a ton of other stuff in regards to work and classes. We all do a lot of work at home as well.

You're right though. I talked to the lead dev and he said he'll talk to him today and I'm gonna bring it up at the meeting, but I'm worried that once I show that I can't build the app he'll use it as an excuse not to pay me.

All right bros, I need some help. For my final uni project, I built an anime image recognition engine. Basically, you upload an anime character and the deeplearning engine tells you who it is or gives you a list of most similar characters. The engine works great and I was getting around 85% accuracy from it with a small dataset of images.

I'd like to put it on the web and allow everyone to use it. I'd also like to open source the whole thing.

I've never built a full-blown web app so I'm hoping someone here can give me some advice on how to architect this thing. Image related is what I came up with. It's very crude approximation of what I'd like to do.

General workflow goes like this:

1) Users come to a website and upload images
2) Nginx with a Node.js or Python Flask/Bottle backend accepts requests
3) Images are stored in a temporary filesystem
4) Requests are stored in the database
5) Webapp then spins up image recognition instances (say, a max of 10) which in turn process uploaded images and send back results to the Webapp
6) Webapp then sends the result back to the client


Does anyone here have some opinions on how I should architect this thing? I plan on using kubernetes/docker for each of the "modules". All my code is in Python3 so I'd like some advice on what I should use to develop the webapp in... either Python or ES6/Node/React. Opinions?

Do I need to add queues anywhere in this architecture? I'm afraid of not being able to process all these requests in real time so there will be a delay, obviously.

Thanks for any advice!

Attached: 1513938494757.png (1051x791, 77K)

>tfw i learned php from a book and didnt write much pure php, instead i learned Laravel pretty soon after the book
am i fucked? is pure php needed today that much? :(

>deeplearning engine tells you
you mean you reverse search it with google brainlet

Not if it doesn't exist.

here you go

added your namefag to the bottom of the picture

Attached: php_updated.png (824x3768, 310K)

That PHP Guy*

fuck it

yes, let me give you an example.

in laravel, you can pretty make instance any class using `$app->build(App\ClassName::class);`, but do you know how it does it ? i guess you don't
that's why you NEED to learn pure php
ps: laravel creates a reflection of the class, if it does have constructor it goes through each one of the parameters trying to build it, if its in the container is gets it from there, otherwise it creates a instance without the contractor. in case it could create a specific parameter ( not found in the container or requires a parameter that is not an object ) it throws an exception.

>but do you know how it does it ? i guess you don't
isnt that the idea behind existene of framework? to save you time?
You are telling me that i need to have PhD in mechanical engineering and PhD in Mathematics so I can be a rally driver and understand how engine works,chemistry behind gasoline ,physics behind movement and all the forces involved...

yes to save you time, but not to be an idiot.
learn the PHP SPL core extension ( the one that contains reflections ) would help you alot, i use frameworks myself ( zend, symfony, expressive and swoole ) but i don't remember going through a project without using something from the SPL extension, google used Samsung screens for their pixel 3, but i don't think they are bunch of idiots how don't know nothing about screens or how they work.
in your example, the rally driver is not the one who develops it, he is the user. but you are a developer, your users don't need to know shit about php in order to use your web application or whatever

>isnt that the idea behind existene of framework?
the idea of frameworks is to make you not know how they work? what? no.
> to save you time?
sure
>You are telling me that i need to have PhD in mechanical engineering and PhD in Mathematics so I can be a rally driver and understand how engine works,chemistry behind gasoline ,physics behind movement and all the forces involved...
do you think rally drivers don't understand the physics that go into racing? what the fuck, dude

Attached: 1459528715826.jpg (245x314, 26K)

Ohaio /wedgie/~
I made an ajax webpage on my localhost and everything went fine, but when I moved it to a server the ajax can't find the div I'm sending the php to (says element is null when I try to change the innerHTML attribute) AND sometimes the actual ajax request returns me a 500 internal server error.

I basically have no fucking idea what's going on because the shit runs fine on my localhost.

Help.

check phpinfo() in the server, maybe its a different php version, extension missing or different configurations

have the same configurations in your localhost and use symfony/debug or whoops package to see whats exactly going on

>he rally driver is not the one who develops it, he is the user
yes and i dont devolp the framework
i am its user and by your own words i dont need to know how all of it works internally
you fucked up here

he's not driving a framework you idiot, he drives the final product, in your case a web application

>do you think rally drivers don't understand the physics that go into racing? what the fuck, dude
yeahh sure driver knows all the equations and how to fix or improve the car
lol

I think it's important to use something that lets you free roam. That way you'll ask yourself a lot of questions about how to connect the dots. I'm working on something right now that I could have done in like 15 minutes using a framework with more cohesion, but the situation now, where I ask myself "how the fuck does this all ties together", is priceless.

holy shit you are god damn fucking retarded when you cant comprehend this
but then again you are after all a fucking shitty webdev the advocate of php
hilarious

hey fuck you dude we are real programmers just like any other branch of programming

been there, done that.
the best think i ever did w i'm glad i did it, was creating my own framework and im not talking about a small one, one in the size of laravel, but never got around to finish it and have so much going on to keep maintaining it so i left it private. however, while developing this framework i learned alooot about php, shit i would never known.
lol

yea sure making websites is same as writing OS or kernel or drivers
lmao fuck off code monkey

Unless you were specifically hired for this project and it says in your contract that you only get paid on completion they can't decide to not pay you because there's something you couldn't do.
What you're asking is that they do what they promised and pay you for your time, don't get hung up on them being nice if they haven't paid you for over a month.

You definitely want queues if you want to scale properly, put every image on a queue and setup workers to pick from them, give the users a unique ID for the job and have them poll every second or so until the work is done so you're not keeping a lot of connections open just waiting for a response.

dude, i just said i use frameworks myself, but i'm not a fucking idiot who doesn't know what the fucking he is using and freaks out running to google when he gets an exception thrown lol

You could probably add a queue instead of the database. When the webapp gets a request, it adds it to the queue. And when the webapp receives a response from a job, it dequeues a request and starts a new job with that data. The images would probably still be best to store in a temporary filesystem like you mentioned.

As for what you should use, I think Flask would probably be fine. But you could use whatever, since you'd probably be spawning a new process for each job. (Not sure if that's your plan, it could add a bit of overhead, but it might be negligible.) You mentioned React, which is a frontend framework, and could be used in conjunction with Flask just as easily as with Node.js. But you don't necessarily need a full-blown frontend framework for this, just some simple JS for handling the uploads and receiving responses would be doable.

My one other thought is if you want an option for user feedback, you could use to improve your model. (E.g. a button for "did we get it right?", and if not "do you know who it is?" slot.) But I don't know how that image training stuff works, and I'm not sure if you can modify your model on the fly or if you'd need to save the images who have feedback so you can add that data later in bulk. But I wouldn't worry about that to start with, you could always add it in later.

I've been studying this for the whole day and I think it's time to ask some questions.

There is one thing I'm careful about in Zend Expressive, I imported some code from my other project and it gets the request data from the $_POST variable. I couldn't find anything about ZE having something like request->query('name'), but that's not something I'm hugely concerned about.

The other thing is, I'm at the point where I need to send form data to a database. One approach is to use ZendDB with the config provider and the database connection info as global in autoload. The other one is using dasprid/container-interop-doctrine.
I think I followed the guides correctly, but the thing that doesn't really click is when I tried to set up migrations.
I found this guide :

akrabat.com/standalone-doctrine-migrations-redux/

and this for some other stuff (which is not directly related to my question):
masterzendframework.com/zend-expressive-or-laravel/
masterzendframework.com/tutorial/zendframework2-hydrators-models-tablegateway-pattern/

my actual question is, how do I connect the info about my database login with my migrations.yml?

but then again why should i need to know the whole source of the framework when I "kind a " know whats happening behind the scenes since to use a framework you absolutely need to already know (on advanced level) the language that its written in

Another tip: don't end your PHP file with "?>" It can lead to outputting anything after that so the PSR says to omit that if it's just pure PHP and not mixing in HTML.

you don't know the whole source of the framework, you will how it's built, the concept behind it, with that you have more control over the things you do, that knowledge makes the difference between a good and a great developer, imagine you need glasses, using a framework when you kinda know what's happening behind the scenes is you driving a car without glasses

it's nuances, you can be a good dev without that knowledge, but if you are building a career out of this, it's for your own good to dive deeper

for reference, you still have a job, not a career (I'm guessing by your behavior towards frameworks)

>you will how it's built, the concept behind it
but isnt this implicated by the sole fact that you use a framework?
i mean using framework implies you know the language and all of its concepts and paradigms
using framework is advanced level
you dont start learning a language by starting with framework, you move to framework later when you have advanced knowledge

- zend expressive follows psr7, so in order to get the request body ( $_POST ), you use $request->getParsedBody(), it should return an array or an object the gives you access to the request body, take a look at the PSR7 request interface here : php-fig.org/psr/psr-7/#321-psrhttpmessageserverrequestinterface

- dasprid doctrine package doesn't have migrations setup, but there's an open pull request for it, it would be merged soon, till then, you can set it up yourself, it should it be that hard. github.com/DASPRiD/container-interop-doctrine/pull/31

- for authentication, i recommend using the expressive-authentication package with expressive-authentication-session, you can then create a user repository that authenticates user, take a look at this :

you don't need to know the source, you need to know the language, if you were aware of php reflections, you would know whats going on on `app->build` without having to look at the source
i guess following PSRs is the last thing he should be worried about

That's correct. But some ways are more efficient than others. Having 2^n operations for each item inside a v-for would be retarded and slow, for example.

>you mean you reverse search it with google brainlet
Try google image search on this pic for example. Can it identify the character? This specific image was not in my training set but it identified it correctly with 98% certainty.

>You definitely want queues if you want to scale properly, put every image on a queue and setup workers to pick from them, give the users a unique ID for the job and have them poll every second or so until the work is done so you're not keeping a lot of connections open just waiting for a response.
Thanks so much! Do you have any recommendations for which queue lib I should use?

>You could probably add a queue instead of the database. When the webapp gets a request, it adds it to the queue. And when the webapp receives a response from a job, it dequeues a request and starts a new job with that data. The images would probably still be best to store in a temporary filesystem like you mentioned.
Thanks so much user. Yes, this was my worry as well. Thanks for pointing me on the right track. Any suggestions for a queue lib?

>As for what you should use, I think Flask would probably be fine. But you could use whatever, since you'd probably be spawning a new process for each job. (Not sure if that's your plan, it could add a bit of overhead, but it might be negligible.) You mentioned React, which is a frontend framework, and could be used in conjunction with Flask just as easily as with Node.js. But you don't necessarily need a full-blown frontend framework for this, just some simple JS for handling the uploads and receiving responses would be doable.
If I were to go with React, I'd do the whole stack with it (back and front). But like you mentioned, Python is a lot easier and I might go with that.

>My one other thought is if you want an option for user feedback, .... But I wouldn't worry about that to start with, you could always add it in later.
Good point! I'll actually add this to my task list.

Attached: 1521650334857.jpg (286x276, 13K)

>mfw i do this on a production server of over 200,000 users except handling passwords

Attached: 1454432577555.jpg (960x720, 53K)

ugh, if you don't mind, you could you please give me the url ?
SO I RUN A FUCKING SQL QUERY, GET ALL YOUR USERS DATA, CRACK THEIR PASSWORDS IN 1 DAY, AND POST IT IN PASTEBIN

but you don't know which one is it, that's the security

if its a contract, then a lawyer will probably swoop down on you like a baby in a snake pit and pull you out and shekel them for as much money as they can get from your employers.

also
>be webdev intern
>be forced to make a phone app
>dont get paid for work you werent trained for

Literal slave labor lmao

Just installed lamp after 4 hours of battle. What should I do now? I'm a beginner.

php.net/manual/en/class.infiniteiterator.php

why do things like this exist? is this some expert level?
Why wouldnt i just write a custom foreach that outputs 14 lines of days in a week?

his answer will be, don't use lamp, use php server

well im sorry, but the first thing todo is uninstall lamp, and install :
- phpbrew
- composer
- mariadb or mysql
- apache
- redis

>dont install this one thing that was made just for that and to install all you need automatically
>install these 34 separate things and configure each so they can work exactly like the one thing that i told you to not install

>Any suggestions for a queue lib?
I haven't used any myself, but I've heard good things about ZeroMQ and RabbitMQ.

yea you can, but thats not the point of it, thats just an example of how to use it.
it can be very useful for other stuff.
1 - lamp doesn't have composer
2 - you will be stuck in 1 php version, phpbrew allows you to switch php version in 1 command, can be useful to test application on multiple php versions
3 - lamp doesn't have redis ( useful for caching )
4 - lamp doesn't make it easy to install extensions, while with phpbrew its as easy as `phpbrew install swoole`

apache is optional tho, as said, php have its own web server for development which is supported by all frameworks

Thanks, fren. Is there any guide to install all of this? Lamp was fairly difficult and this setup sounds even more difficult to configure.
It's ok, I'm not in a rush to get a setup working. And besides, I did notice that you can only use version of PHP with lamp, so I already felt how archaic and boomercore it is, and I did not like it.

>yea you can, but thats not the point of it, thats just an example of how to use it.
>it can be very useful for other stuff.
im just scared that i am missing out some important stuff
are these Iterators and other stuff from this standard library used often?
are these things all built-in php by default?
wtf is all this im scared php.net/manual/en/funcref.php

i think i dont quite fully understand the php ecosystem
are all these libraries part of php language or custom stuff made by people to help you save time when you e.g. manipulate images?

why would you use multiple php versions for your project in 2018?

I certainly don't need multiple versions of PHP to learn it.

uhm i dont understand how is this answer to my question
i thought you wanted multiple php versions

installing phpbrew :

$ cd /tmp
$ curl -L -O github.com/phpbrew/phpbrew/raw/master/phpbrew
$ chmod +x phpbrew

$ sudo mv phpbrew /usr/local/bin/phpbrew

read more : github.com/phpbrew/phpbrew/wiki/Quick-Start

installing composer : getcomposer.org/doc/00-intro.md#installation-linux-unix-macos

installing mariadb :mariadb.org/download/

installing redis : digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04
this is for Ubuntu tho, idk what you are using exactly but it shouldn't be hard, its also not needed if you don't need caching with redis specially if its a development setup
they are used all over in frameworks in libraries, and i'm pretty sure you are using some functions for the standard library without knowing it, like the `count` function, queues in laravel and zend use it as well
and yes, its a core extension, meaning it is bundled with php by default
here's a list of all extension by member ship, i would suggest starting from the core extension and down, learn about them and why they do and offer, you dont have to master everyone of them secure.php.net/manual/en/extensions.membership.php

php core extensions are part of the language, they are being handled by php internals as well as the bundled extensions and the external extensions.

ps: external extensions work like a wrapper between other shared libraries, for example curl, php curl extension is like a port that allows you to use curl from inside php
you don't, but currently i'm working on a project with php 7.2, but i do run tests on php 7.3 beta as well, so when it comes out, i'm 100% sure that my project will be working fine with nothing to worry about
also, its easier to upgrade using php brew, you just download the newer php version and switch to it

God you sound like a fucking autist

i am

>hey are used all over in frameworks in libraries, and i'm pretty sure you are using some functions for the standard library without knowing it, like the `count` function, queues in laravel and zend use it as well
oh i understand it now, they are useful when you want to make your custom methods e.g. in a framework
and yes i remember "count" from Laravel and many other helpers
thank you Guy , php community need heroes like you
i dont know why is everybody shitting on php when they dont know how to properly program with it and thus bad programmers ruining the big picture
javacript meddled too much and too deep with webdev world
its a mess

*blushes*

>If I were to go with React, I'd do the whole stack with it (back and front). But like you mentioned, Python is a lot easier and I might go with that.
No, React is a frontend framework; it's code that is only running in the browser. It needs some server on the backend to communicate with.

I know. I was thinking about using node.js/ES6 for both the frontend/backend with React as a frontend.