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

/wdg/ - Web Development General

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

Thread replies: 312
Thread images: 30

File: 1489846071743.png (868KB, 822x552px) Image search: [Google]
1489846071743.png
868KB, 822x552px
Previous thread
>>59461667

>Discord
https://discord.gg/wdg

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

>Learning material
https://www.codecademy.com/
https://www.bento.io/
https://programming-motherfucker.com/
https://github.com/vhf/free-programming-books/blob/master/free-programming-books.md
https://www.theodinproject.com/
https://www.freecodecamp.com/
http://www.w3schools.com/
https://developer.mozilla.org/
http://www.codewars.com/

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

>Backend development
https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks
[Gist] backendDevelopmentBookmarks.md

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

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

>How to get started
http://pastebin.com/pDT82mQS (embed)
http://pastebin.com/AL6j7GEE (embed)

>cheap vps hosting in most western locations
https://lowendbox.com
https://www.digitalocean.com/
https://www.linode.com/
https://www.heroku.com/
https://www.leaseweb.com
>>
what is your go to project for learning the new flavor of the month framework?
>>
>>59501355
a blog
>>
For my eurofriends out there, just wanna bring to your attention two dev bootcamps that I think are worth considering. One is LeWagon, which runs in a bunch of european capitals (London Paris Lisbon Brussels etc), it's 9 or 12 weeks for 4k euros.
The other one is Coder's Lab in Poland (many different cities), 6 full weeks of coding for 2k euros, pretty cheap imo. You can choose front-end or back-end.

I haven't done any, but I'm considering doing one or the other, I think they're pretty cheap compared to most US-based bootcamps. Anybody have any experiences with either of these? I see great reviews about LeWagon everywhere, which makes me think they're either fucking awesome or shilling hard-mode.

Thoughts, opinions, memes?
>>
I need to make a short test for a front end developer. Our front end utilizes Angular2 - I was thinking of implementing 95% of the front end of a todo application and having the applicant just finish the model + view (list already being done, end point, backend, etc).

Shouldnt take more than an hour at most - does anyone else have any ideas for this? It is pretty difficulty to interview for these positions.

My main concern is that TODO application is done everywhere so copy/paste from those will likely happen.

This will at least give us something to talk about during the interview.
>>
Also, can we talk about online courses and MOOC's and all that stuff? Looking for recomendations...

I'm currently doing CS50x on edx.org, which is the Harvard intro to comp sci. The course is amazing, I have to say. Really gets to the fundamentals of things, not like codecademy and others like it.

We start off with a few weeks of C and then we jump to Python, and there's gonna be some javascript in the end. But more than the languages themselves, you really learn about concepts and ideas. There's tons of exercises with guides, walkthroughs, help forums etc, all free.

Any online courses to recommend?
>>
A few years ago I learned stuff like Ruby, Rails Sinatra etc. along with some meme js (angular 1). In my new city I've had trouble finding work and everything here is asp.net

Do I get back into ruby or pick up c# + asp.net (I plan on picking up c# eventually anyways for non-work reasons).

Can someone drop a very quick and dirty comparison of rails 4/5 and asp.net? I need to pick up a more up to date framework.
>>
>>59502114
>In my new city

job markets vary wildly from location to location. Here in the uk more than 70% of jobs are java/c#. All the new memes that silicon valley rages about are non-existent on this side of the Atlantic. So yeah, location is something to consider.
>>
>>59502165
Guess I'll try picking up asp.net and maybe angular 2 or something. Do you know how well react pairs with asp vs angular? I prefer backend but react seems somewhat interesting and angular 1 left a shitty taste in my mouth.
>>
>>59502213
I'm working on a massive product in {{enterprise}} environment and other bigger companies are leaning towards Angular2 + a backend (WebAPI for example for us). Node is gaining tracking. Java could even work for the backend.

Angular2 doesn't care what its talking to as long as its REST.
>>
>>59501594
I still don't understand what coding bootcamps are.
>>
>>59503198
basically you give a group some money and they teach you javascript over the period of a month or two - its less than community college and you walk away with nothing that matters on paper (no diploma as far as I know)
>>
>>59501345
Im a beginner in js (not really I know the basics kinda) i wanna know what books or courses do you guys recomonned?
I only want to learn javascript for web mapping stuff (not a pajeet website buulder)
currently doing the jon duckett book and will move to eloquent js later and finally how to ve nina at js

do i guys think my plan is good?
>>
>>59503429
ninja *
>>
>learn html and css
>want to put it to use before i move on to Javascript
>cant think of anything to make

i guess thats it then
>>
>>59503536
go to freecodecamp and do projects there
>>
>>59503536
Just make a static website.

After that, you can start to make a Wordpress theme. Which will introduce you to basic php. If, else, arrays, include.
>>
>>59501355
I just refactor the same CRUD app that I use once a year to perform inventory at work.
>>
>>59503130
Thanks anon, I'll look into asp.net + angular 2 then.
>>
>>59503429
Yeah that's fine. I think the eloquent book (i just had a skim over it) is perfectly fine for a beginner too
>>
>>59501594
Or just buy a udemy courses on sale for like 10-15 euros. If you have enough discipline and do some extra googling its much cheaper than a bootcamp
>>
>>59506884
any good courses to recommend?
>>
>>59504394
crud is like a todo app, right?
>>
I'm learning js sort of I guess, and trying to use an audio player with a waveform and I'm wondering what obvious misstep I've taken here.

http://codepen.io/anon/pen/peamrv

This is exactly the code on the devs documentation, but for some reason it's not loading.
>>
>>59507135
create read update delete, basic database operations. A todo app is an example, yes, but there's thousands more.
>>
Any reason to use anything other than port 80? What if I have 2 projects on a server? Should I be using different ports?
>>
>>59508166
You could serve one on 8080, or have a nginx server on port 80 and proxy pass both of your servers.
>>
I'm still writing my image board. You can either use no captcha or recaptcha.

Would it make sense to add an option for the spergs that uses some garbage tier captcha libary that works without Javascript but gets bypassed by machine learning patterns?

Not using recaptcha is literally using no captcha desu.
>>
>>59508531
Just stick with reCAPCHA. No need to complicate things. Captchas will always be solved regardless.

I have an account on a service called deathbycaptcha so I can run scrapers for various web services and those captcha solving services have people that manually solve the captcha for you.
>>
Does anybody know how can I export a database of a website hosted on Openshift?
>>
How do you guys decide on background color and border for a website? I'm doing that first project at FCC and no matter what I try it looks like shit. I suppose the most I could do was find something and copy from it...
>>
Just got a job to make an admin panel in laravel and import XML to a database then present it in the panel

I think I'm quitting webdev, this is the most boring and abhorrent thing I did ever

I wish there were as much C and Elixir jobs
>>
>>59509719
>C
what about CE jobs, embedded systems stuff
>>
I just started working on my first semi-serious website project. It's extremely basic.

Can anyone review my code and let me know what I can improve on? I'm just getting used to the differences with margins and padding.

Getting the top navigation bar to properly align at the very top was a pain in the ass. I hate how you need to literally do margin:0 for everything until you figure out which one it is.

https://jsfiddle.net/yjd2rqhy/

I understand CSS should be in a seperate file, but I was feeling lazy. I just wanted to get the website looking somewhat colorful.
>>
>>59504971

lol.
>>
Any recommended resources of wordpress for experienced programmers? Most resources imply a beginner, thus explain how webservers work, CSS, HTML, PHP, etc..

I'm looking for something that implies that you already have programming experience, just never went over to WP.
>>
Having trouble with letsencrypt. I'm using Django with the standard Apache WSGI http server.

When I run letsencrypt certonly there's a failed authorization error. Seems it's unable to write to /.well-known but changing permissions doesn't do anything. If I go to the page that letsencrypt is trying to get a response from, I just get a standard 404 error.
>>
>>59510122
those work but harder to get in my area / freelancing
>>
>>59510699
Tried this package?
https://pypi.python.org/pypi/django-letsencrypt
>>
what's your guys opinion on a two year aas degree for web development?
>>
>>59510836
Waste of time and money. Just go through some Udemy web development courses if you're willing to pay the money. A lot of them have you doing a lot of projects and websites.
>>
>>59510856
oh this is really important info. It's all online and the tuition is free(for me)
>>
FUCK, webdev is overwhelming
I am gonna stop browsing shit right now and dive deep into.. React/Redux? Is that okay?
>>
>>59510920
If you want to do a front end single page app, sure. Also look in to Vue.js.
>>
>>59509719
I swear I hate it so much to program administrative interfaces. It's just boring and I always need to check the data so the retarded enduser can't fuck shit up.
>>
I'm trying to do something weird in angularjs.

I need to do a get request on a URL that returns a redirect. Instead of following the redirect, I just want to fetch the URL that it's redirecting me to. Is this possible?
>>
>>59509676
Google search Web design color theory, and or steal someone else's colors.
>>
File: dhjdyj5.jpg (44KB, 451x392px) Image search: [Google]
dhjdyj5.jpg
44KB, 451x392px
>>59504971

>being a .net M$ faggot
>>
>>59511828
What's wrong with that?

C# is nice
MS is pretty neat when it comes to dev tools
>>
How viable is learning to build websites using a java framework?
>>
>>59511925
modern practices involve using java for the backend API only. build a RESTful web service and connect to that using a front end framework such as angular.
>>
>>59510821
This solves permissions and the SSL certificates are generated but I can't access the site via https. Is there something I'm missing?
>>
>>59512061
Are you running the server on port 443 (HTTPS)?
>>
>>59512289
Just tried and strangely http still works and still https doesn't. Chromium is redirecting to https and won't serve http at all. Firefox can serve http but not https. Neither browsers have preference for https. Port 443 is open.

Apparently waitress which I'm using to serve doesn't natively support https so I need to use nginx as a reverse proxy.
>>
>>59510344
pls respond
>>
>>59512985
There should be a <!DOCTYPE html> at the very top, to indicate HTML5.
It doesn't have a <meta name="viewport" content="width=device-width, initial-scale=1"> tag for mobile view.
If you want to add mobile styling look up css media queries.
Putting CSS in a file is not hard, and it is necessary with multiple pages with similar styles. Obviously on jsfiddle it goes in the box though.
Your form does not have an action. Even if you plan to use ajax, it's still good practice for (non-app) sites to work without js.
>>
>>59507187
The reason it's not loading is because you are calling the script before the DOM is loaded, thus, when it looks for the waveform div, it doesn't find it because it doesn't exist at that time. The best way to avert this is to wrap your stuff and functions to a DOMContentLoaded event or something similar, like
 
$(document).ready(()=>{//yourcodehere
})
//or
document.addEventListener('DOMContentLoaded',()=>
//your code here
)

Here's a lazy example example:
http://codepen.io/yeasayer/pen/QpmpJV
>>
Anyone have an idea why this is happening? I set
content="width=device-width,initial-scale=1"
in the html and use media rules. I tested it all in responsive design mode and it looked fine, but it messes up when displayed on my phone.

here's how it looks in responsive design mode:
>>
>>59507036
Any that have lots of reviews and good rating I personally used the Web Developer bootcamp one and Modern React Redux + Advanced Redux all are very good and if you don't have money you can pirate them even.
>>
>>59513250
and here it is on my phone. I have normalize.css set also, otherwise it looks even worse on mobile. what do?
>>
>>59513250
>>59513264
I don't have time to look at it but if you want help post link or code (jsfiddle, pastebin, whatever).
>>
>>59513250
>>59513264
>>59513336
http://pastebin.com/wU3Dugvf

it's all react, I omitted all the functions and junk otherwise it would be too long. everything should be pretty obvious from the jsx though
>>
anyone know what could be the reason only my POST requests aren't working on a PHP app hosted on Windows Server IIS? GET works fine. Permissions look fine. Connection to db is fine. It's giving me 404 status errors which is really weird because the files are there. I even removed the code real quick and echo'd some text to make sure. I open up my network debugger and as soon as the request is made it goes "pending" then fails.
>>
>>59513690
sounds like it's dying at the db, db not allowing it to write?
>>
>>59513690
do you have tracing enabled in your web.config?
>>
What's the best way to store settings of users? Currently I'm putting everything in the usertable, but what if it becomes 30 or 40 settings or more? Is there some better way?
>>
>>59513833
firebase

https://firebase.google.com/docs/auth/web/manage-users
>>
>>59513833
there's no best way.
you can save it as json, have a table with a column for each setting or have a table with string/value columns with each setting being its own entry.
>>
>>59513708
>>59513740

ok thanks i got it now

another question - not sure if i did this the most secure way...i have an "add new record" php file that inserts another row into a table...im calling it with AJAX, and it works properly now, thanks, but i noticed if you just go straight to the URL, a blank pages shows up but a new row actually still gets created. Is there any way to prevent that?
>>
>>59513182
the form isnt supposed to be interactive. I just wanted to try the input tags.

Im still having trouble with the positioning like relative, absolute, etc.

Also padding and margins confuse me. As soon as i think it finally clicked, something goes batshit crazy and makes my layout look like shit.
>>
>>59513892
check if it's actually a POST request with valid data.
where did you read up on doing it without that?
>>
>>59501675
The best test and hardest I ever received was to create a slider like bootstrap v4s with html css and js, use es6.

The easiest I ever had was a todo list with angular2.

A good medium was a airport management system, add, edit, delete, push notice to other components, etc etc
>>
>>59513928

how do i do that when theres no data im sending? its just a "add new record" script that calls a INSERT query
>>
>>59513981
go read up on validation, you're a gaping security hole.
>>
>>59513904
Relative = in the flow of the document.
Absolute = pulled out of the flow and plopped somewhere on the document.
Fixed = like absolute but fixed on the screen so it won't move when you scroll.
Padding = extra space on the inside of the element. Like on a link or button will make clickable area larger.
Margin = extra space outside of the element.
>>
>>59514009

i know about form validation but theres no data im sending just tell me man. I tried googling but i dont even really know how to explain it. I'm not checking for any data that im sending. I just want to prevent the direct URL from running the script...i only want the button to add a new record be able to add a new record. What is this called?
>>
>>59514205
check if it's a post request. if it isn't exit the script.
>>
>>59514228

this didnt work...any idea why?

if (isset($_POST))
{
//do stuff
}
else
{
//throw 404
}
>>
>>59514307
https://encrypted.google.com/search?q=php+check+if+post+request
>>
>>59514343

ah fek i have to use $_SERVER, thanks
>>
PHP7 is god tier. Really fast. Much improved. Thank you based zend engine.
>>
>>59514173
To add to that, absolute positioning seems like a great idea at first until you account for multiple screen sizes and what not. Also, you can have an element with absolute positioning inside a relative element, where it's positioned absolutely based on the parent element.
>>
>>59513833
Create a table called just for their settings and link the user via the foreign key.

I don't know what kind of language you use but you could request that monster as an object in PHP and cache that object after sign up. Than all settings can be loaded from the object. If the user updates something you should refresh the cache.
>>
>>59514846
thanking zend devs after the atrocity that was php 6
>>
>>59513619
so the moral of this story is that you have to use inline styles for react-modal.

anyone know how to simulate an accurate iphone web browser on your computer? Setting the correct pixel width x height in the responsive design viewer isn't enough it seems
>>
Well /wdg/ I failed. I studied for a good while and some faggot decided to offer me a tech support position. I left my last tech support position because I hate that shit and it makes me hate myself (more than usual).

But it would've been illogical to turn down the money. Is there anyone else here with a full time job learning on their own? What are your study habits? Any advice for someone that might have to resort to just an hour or two of studying?
>>
anybody do a bootcamp? looking into some now, seems like a great option.
>>
>>59517645
Better check those realistic placement rates of the boot camp you want to go to. Would suck to drop 10k for some shit you could've studied on your own the whole time and end up with nothing to show for it.

It would be really nice if there were someone that made a study guide for everyone that would just liek to have the study structure / curriculum to know where to go next.

From my understanding of them they are for people that have the drive to go for 8 hours a day and if you're that type of person then you don't really need them in the first place, you just needed the structure.

Just my opinion.
>>
>>59517645

I didn't and it took me way longer than the 10 weeks to do all the material and projects myself. Doing the camp would be like paying for motivation, I should have done it
>>
should i learn node or laravel?

both have the same amount of jobs in my area but i think node would be more future proof. i have a cs degree
>>
how many of u have been using react+redux? ive been studying it for the last few days, it's starting to click
>>
>>59517875
bump
>>
>>59517725
>>59517741
These. The biggest benefit of these camps are having structure and real life people who can help you. However, there's a lot of material that will be passed over in 8-16 weeks that employers will look for if you ever try finding a job. You're going to have to do a lot of heavy lifting during and after the fact (Or have a degree, a lot of people who went to a recent-ish bootcamp in town who still have jobs have experience/a degree in another white collar field.) to be employable.

Also, employers are starting to see a lot of bootcamps as cheap psuedo-degree mills, so they're being rather hesitant to hire people unless they have a kick-ass portfolio (Unlikely) or like I said before, have a degree.
>>
Hey guys, need some SQL help.

I have four tables;

Suppliers(S#, SNAME, STATUS, CITY)
Parts(P#, PNAME, COLOR, WEIGHT, CITY)
Jobs(J#, JNAME, CITY)

and SPJ(S#, P#, J#, QTY) which is a table which represents shipments of parts from suppliers to jobs. S, P, and J are all foreign keys to their respective tables. I need a query that gets the name of projects with one or more red parts supplied to it. Any tips in the right direction?
>>
How do I implement authentication without having the server store something in ram for the user's session?

Are cookies off-limits?
>>
>>59517875
node.js for sure
>>
any good css template website?
>>
>>59518817
You mean something like this?

SELECT `SPJ`.`S_id`, `SPJ`.`P_id`, `SPJ`.`J_id` , `Parts`.`COLOR`
FROM SPJ
INNER JOIN `Parts` ON `Parts`.`P_id` = `SPJ`.`P_id`
WHERE `Parts`.`COLOR` = 'Red'
>>
>>59520578
Skeleton and Bulma are pretty decent if you want a framework
>>
>>59518817
Something like:

SELECT
Jobs.JNAME
FROM
SPJ
LEFT JOIN Jobs ON Jobs.J# = SPJ.J#
LEFT JOIN Parts ON Parts.P# = SPJ.P#
WHERE
Parts.COLOR = 'red'
AND
SPJ.QTY >= 1
>>
>>59520619
Thanks will check em out
>>
Anyone do freelance web dev here? Wanna know how much it takes to be decent enough to get jobs. I know python decently but that's about it
>>
How do I load a custom webpage onto chrome for the New Tab/ New Window page?
>>
>>59522297
I forgot to mention, in Chrome
>>
>>59519454
https + basic auth if you're ok with an ugly login dialog
>>
>>59520833
I'd say generally you should know what you're doing enough to complete said jobs. Knowing a little bit of python is a good start but not if you want to find steady work. I'd get very comfortable with python, then learn as much as you can about Flask, then learn html, css, and javascript.
>>
>>59522315
There are chrome extensons for this such as Replace New Tab Page

You could roll your own extension but if you had to ask this simple question you probably wont.
>>
>>59523014
I never see jobs where they require python are you based in US?
>>
File: example1.png (30KB, 1435x353px) Image search: [Google]
example1.png
30KB, 1435x353px
>>59523014
For example, Monster.com doesnt seem to favor flask and python
>>
File: example2.png (36KB, 1398x476px) Image search: [Google]
example2.png
36KB, 1398x476px
Node and Javascript seem to be more in demand. Wouldn't it be better to play the numbers game and focus on Javascript proficiency?
>>
>>59524876
https://www.indeed.com/jobtrends/q-nodejs-q-flask-q-python.html
>>
>>59525084
thanks!
>>
>>59525084
>comparing languages to frameworks

https://www.indeed.com/jobtrends/q-python-q-javascript.html
>>
>>59525415
>https://www.indeed.com/jobtrends/q-python-q-javascript.html
glad I know js lol
>>
What's the best MOOC to train yourself on designing HTML pages with bootsrap ?
>>
File: minch1.png (7KB, 299x276px) Image search: [Google]
minch1.png
7KB, 299x276px
Hey. I just landed my first real project. Very excited.

It will be setting up a landing page for a business.

Looking for some sharp primers here. A succinct guide.
Can someone layout the step-by-step process from stage 0 to having the website up and running?


What does the general process look like?
>>
>>59526443
>html
>css
>fix up both
>get a server
>upload files
>???
>profit
>>
>>59526443
you need to pick a host

most have a retard-easy content management system

if for some reason you dont use their cms the best practice is to use a static site generator.

if youre some kind of hotshot ace memester go ahead and try out Materialize and waste yours and everyone else's time.

>what does the process look like
Customers never have quality content you end up making it all for them.

A lot of search engine optimization boring shit (hopefully your chosen host's cms has a wizard for SEO).

Constant updates are required in order to maintain position in the SEO ratrace.
>>
is it tough to get a job without a github? i dont even know how to use git. I guess I dont see how it could be useful for me since im not working on any projects atm. Seems like theres big time projects people work on there i feel like if i started something it would be shit i dont even know what to start. Also what if your project is using a db? how does that work on github...
>>
I have a website that's more of a webapp:
http://campustips.net/

using a map kind of thing I made.

Adsense prefers websites with lots of text. In previous projects I've tried putting lots of BS text into the site but adsense still won't approve

are there any better platforms to use for advertising if my website isn't text heavy?
>>
>>59526471
>>59526534
Taking notes here. Please some good primers/recommendations or more details.
>>
>>59526713
I've only ever had success with organic search. PPC shit simply doesnt work anymore for my customers they priced themselves out of the gamer.
>>
>>59526713
What keywords / competing sites are you targeting?
>>
>>59526769
Organic search? How do you make money off of that?
>>
>>59526799
Maybe I wasn't clear: I'm trying to get revenue FROM advertising, not that I'm trying to advertise my website. Adsense is the platform that pays you for hosting ads, adwords is the platform you go to in order to advertise with google.
>>
>>59526713

dude this is fucking cool good work, what stack did you use?
>>
>>59526839
LAMP I guess? I don't use any frameworks for JS or PHP. I made the map in HTML5 canvas so that I can add some navigation tools to it later (zooming in, etc.)

I think the frontend needs some work, too. I don't really have an eye for design.
>>
how expensive is it to run your own server out of your house? also im guessing theres some high priced software you'll need to actually put your site on the internet?
>>
How often do you get stumped trying to code something, pour over your code for hours, go to bed, and wake up the next day to find the issue immediately? This happens to me often enough that sometimes I just give up before troubleshooting fully because I assume that I won't find the issue till the next day.
>>
>>59526990

if you own everything (ie. a dedicated computer, cables, router) and already have an internet connection, then the cost is the price of electricity. the software is free. are you just starting out?
>>
>>59526990
>high priced software

Not at all. In fact, it's free.

The process is simple:

1.) Install an HTTP server. Apache is easy to setup, but I hear nginx is better because it's more fault tolerant. I use apache because I've always used apache. You can install this on any OS really.

2.) Forward your ports. Your computer needs to be able to send and receive data, and your local network (your home wifi) probably disables receiving data on certain ports by default for security reasons. Port forwarding is router-specific, but there are tutorials for lots of routers on https://portforward.com/ By default http serves on port 80, but you can configure your server to use almost any port.

3. Make a website. Learn HTML, JS, CSS, and a backend language like PHP. PHP may require further installation (an apache plugin for example) but that's as simple as download and install.

The only cost is if you pay data costs from your ISP as well as the cost of electricity to run your server
>>
>>59526998
Happens to me at work all the time. My coworker spent all day setting up his environment and dealing with bugs there only to realize the feature he was supposed to be fixing in our application didn't exist in that version of the application, so he closed to case and called it a day
>>
>>59526998
Happened to me all the time when I was first getting started. I talked about the phenomenon with other people too. I found that I didn't even have to sleep on it so much as take a break. 15-30 min and go eat or something. Come back and start tinkering again, usually the first or second thing I try works, and usually within the first 10-15 min of sitting back down. Really is a strange thing
>>
>>59526628
github is just a popular git hosting site with a nice ui and complementary services
you can pretty much use another provider or just host your own repo.
the point of hosting stuff on publicly available repos is to show off to future potential employers that you are not one of these retards applying for a code job without actually being able to make anything past a fizzbuzz, and that you can indeed code
if you want to host functioning demos of your projects as well then host your web aplication, dbs and other dependencies somewhere while potentialy making your code available on a public git repository

if you don't have any project idea just do some basic shit like a twitter clone, 2048 game or whatever
alternatively lots of free software projects allow you to contribute to their stuff, so you could show these contributions off instead of your own shitty projects
mozilla projects seem to be ez for this as they tag some of their github issues as "good first bug" or whatever for new people, but idk you could make a tt-rss plugin as well or whatever
>>
>>59527045

im a full stack dev already i just dont know much about setting up my own serverz yet
>>
>>59501345
Hey folks someone new dev for web.
I have a drupal site outputting json to a ln element in html.
I believe drupal allows me to do otherwise such as a file but for right now i just need to take the json regardless and just use it.
Does anyone have a tutorial where they can pull json string or from an element to another website. (drupalsite.com/json to nondrupalsite.com)
>>
>>59527274
What does it look like when it outputs to html? It's in the html tag?
>>
>>59527268
Well good then it should be easy
>>
>>59527295
Yes its in the html tag
>>
>>59527341
>>59527295
Or sorry it between a open and close tag to clarify
>>
>>59527341
Then you can grab the tag by id and put its value into a js variable
html:
<div id="myData">
{something:"someKey", bla: "bla bla"}
</div>


js:
var myData = document.getElementById("someKey").value;
//then turn it from a string to real JSON
myData = JSON.parse(myData);
>>
>>59527425
Ok so pseudo code (im phone posting o. Toilet)
[Code]
Grab data from drupalsite

Your codeñ

Then use one of the values
//in this instance a url to an image
[/code]
Im on a local environment testing both sites on the same machine. This is a demo for work to see. So how exactly would i reference an element of another page?
From there i can figure it out with tje code you provided
>>
>>59527512
I didn't understand any of that. But you're trying to take values from a previous page and toss them to another page, is that right?
>>
>>59527603
Well yes take an image url from json from one page to another.
Sorry quickly phone posting . the meeting is in an hour
>>
anyone know why my SMTP server only sends the emails to the queue folder on my server? Doesn't actually get sent to my email address
>>
>>59527661
could more easily throw it page to page using local storage.

var testObject = { 'one': 1, 'two': 2, 'three': 3 };

// Put the object into storage
localStorage.setItem('testObject', JSON.stringify(testObject));

// Retrieve the object from storage
var retrievedObject = localStorage.getItem('testObject');
>>
>>59527745
Surprisingly works! Usually my Java Script s*** never works
>>
>>59502114
Try out some asp.net it can't hurt. It's just like any other MVC architecture/framework. Plus razor makes it pretty easy to design your page to focus more on logic.

Visual studio can scaffold and generate the basic crud shit

However, like most .net shit, it can get pretty fucking frustrating and be fickle
>>
>chikfila hamburger menu is a chicken sandwich

That's toptier UX
>>
>>59528077
>go to website
>hover over menu
>black bar pushes it away
>it keeps jumping away from mouse
>menu just blends out but uses as much space as before
>it keeps asking for location on every page

Care to post a screenshot? I couldn't find it.
>>
>>59528355
It's for mobile so just shrink the window.
>>
>>59527661
Send it as a manually added GET ?image= + url

Dont forget urlencode. Then yoi can get with PHP of regex with JAascript.
>>
>>59510344

Learn flexbox

Wesbos' "what the flexbox will help if you need it (free)
>>
>>59510836

Utterly useless. Either 4 yr compsci for credentials or self teach with freecodecamp/cs50.
>>
>>59528808

or just learn on the

INTERNET
N
T
E
R
N
E
T
>>
>>59510344
On line 19 the color is missing the # but that line isn't necessary anyways since its the same color as body.

I'd maybe stop using #id selectors and stick to .classes, or do some more reading on the differences.

Also, the h3 above the form would probably make more sense semantically if it was a paragraph <p> instead.
>>
>>59524830
Ironically enough, I figured this out within minutes of asking
>>
File: thinkingemoji.png (51KB, 599x338px) Image search: [Google]
thinkingemoji.png
51KB, 599x338px
>>59526443
>>59526471
>>59526534
>>59526763
>>59520833
>>59523014

ok, so I might sound like a newfag, because I actually am pretty new to this. But this one question has been bothering me.

Could I just not spend a few hours/ even days making a website from scratch and use a template? Would this cause any shite effects?

Does anyone do this? theoretically you could shit out dozens of sites a day by just doing this.
>>
>>59529746
There's nothing stopping you or anyone else from doing that. That's why its not very profitable. You'll be competing with people from all over the world who can work for much cheaper than you probably and are likely more skilled just from the experience. You could scam people I guess and lie about your skills and the amount of work you'll be doing but any decent client will see through your shit anyways so whats the point?
>>
File: 1483466039987s.jpg (2KB, 125x115px) Image search: [Google]
1483466039987s.jpg
2KB, 125x115px
>>59529906
what, a pizza place in idaho would know this?

I'm a beginner, so I'm not trying to get decent clients, I guess.

but yeah, messaging restaurants and 'mom&pop' type of shops etc. with this strategy would work, right? this would basically eliminate competition?

how much would be a reasonable amount that they'd agree on?
>>
>>59530120
bumping the money question.
I'm gonna make a website for my mom's friend and I have no idea how much I should ask her.
From what I hear, it's a basic static website for her cleaning entreprise.
>>
>>59530188
can you post a screenshot of the site or something?

I'm really curious
>>
>>59527268
Then you're not full stack...
>>
Just got the hang of HTML and CSS but my websites still look like shit design wise. How do i fix this? Everything still looks like its Web 1.0/2.0 static html shit.
>>
>>59531293
CSS frameworks baby, yeah!
Also lots of CSS magic
>>
bugcandemy is very good but buggy as fuck
>>
>>59531304
im completely new, what exactly does a framework do that css can't?
>>
>>59531379
A framework is pre-written css, you dont have to write all css by yourself, makes it easier to style your website
>>
>>59530392
I didn't make it yet, they asked if I felt like doing it because they heard I could do it.
I never made a website but I guess it's probably not harder than the project I had to make for school.
>>
>>59531293
Copy ideas from codepen or dribbble
>>
File: habsburgcahmpyootors.jpg (98KB, 1000x800px) Image search: [Google]
habsburgcahmpyootors.jpg
98KB, 1000x800px
>>59531454
seems like they're pretty uninformed about web dev and tech in general?

if so, you could make the process a bit less of a pain using something like pingendo for bootstrap or something similar. it's basically a drag n drop and I used it once and it's pretty ok
>>
>>59527268

"I'm full stack"

"IDK how to set up the basis of a backend"

how dare you
>>
>>59529906
Nah, those fuckers can shit out templates but they can't dev. The money comes from offering custom shit.

Half the work I get offered is for added functionality on to pajeet's shitty template and they pay 70 an hour.

Then, here's the real REAL money, make a proprietary framework that does something. Sell it to people who need that something done. Then offer custom shit but charge 200 an hour. They have no choice but to pay if they really need it. Especially if their whole business depends on the site.
>>
Does anyone know how to set up Wakaba here?

I'm trying to make a small chan to play with and run on my local network, but I keep getting this error:
>Unrecognized character \xE2; marked by <-- HERE after N_PASS => <-- HERE near column 28 at config.pl line 11. Compilation failed in require at >/Applications/XAMPP/xamppfiles/htdocs/SpessChan/wakaba.pl line 16. BEGIN failed--compilation aborted at /Applications/XAMPP/xamppfiles/htdocs
>/SpessChan/wakaba.pl line 16.
Line 11, char 28 is a ' symbol, and line 16 contains the MySQL database password

I'm pretty sure I've got Apache and MySQL set up right, but I'm not certain.
I'm really new to anything web related.
>>
guys I have an interview tomorrow with a large ish company for front end and I have no HTML experience WHAT DO I DO
>>
>>59533856
Go to codeacademy, sign up and do their HTML course. It shouldn't take you long

Why did you apply for a job that you have no idea how to do anyways?
>>
>>59533856
Kys
>>
>>59533856
obtain HTML experience
>>
>>59530188
Ask her for sex.
>>
File: 222201722581.jpg (78KB, 686x366px) Image search: [Google]
222201722581.jpg
78KB, 686x366px
What a fucking joke.

If I knew all that shit I wouldn't acceot less than 400k a year and a CTO title.

What HR person thinks this is acceptable and still has a job?
>>
>>59535238
I know all of that except for Scala and I'm getting $65k
>>
>>59535275
Calling bullshit. I get that for entry-level PHP in bumfuck nowhere. Who knows 3 kinds of C? Carmack?
>>
>>59535312
I've rewritten parts of the scheduler on Linux in C to properly support process decay, made a few websites in C#/ASP .Net 5, and have written game server cores using C++
>>
File: tertels.png (83KB, 404x310px) Image search: [Google]
tertels.png
83KB, 404x310px
>>59527268
>>
>>59535238
why the question marks. they're not sure if they need those ?
>>
I know if you have a website through wordpress you can't have adsense on it, but can I have adsense ads on it if I download a wordpress theme and host it myself? I already have the domain name registered.
>>
>>59535860
Yes? I dont know the rules around poverty dev monetization.
>>
>>59535860
Yes, you just can't have adsense on a *.wordpress.com site.
>>
>>59536196
>poverty dev monetization.
I'm in expert in the field my website is about and I should be able to get tens of thousands of followers that check my site at least once or twice a week.
>>
>>59527268
full stack your ass, pajiet!
>>
File: Screenshot_34.png (60KB, 648x881px) Image search: [Google]
Screenshot_34.png
60KB, 648x881px
>>59501345
/g/uys, help.

How would you guys handle this using Node/Express/PassportJS as your base?

A website with a nav bar and a content area. For each page, you just load new content into the content area without reloading the page. Load different content based on whether the user is authenticated or not.

So far, I have an empty <div> in my index.html, and I gave that page a client side JS controller to perform AJAX calls to load html from other files into that <div>.

This works up until I have to deal with authentication, because I don't know how to check if I'm authenticated or not from within the client side controller or HTML.

How would you professionals do it?

pic is the part of my controller that does the AJAX call.
>>
>>59536429
Use React or Vue.JS
>>
>>59501345
Anyone know some trick to force 'fullscreen' on modern iOS devices?
I set my body height to 500vh, disabled scrolling on body and added a fixed div with an ontouchmove eventhandler that removes the div once the canvas behind it is on screen.

thing is, I can't seem to cancel the touchmove event to disable scrolling once the address bar is gone and the canvas is on screen.

Anyone got some tips? And don't say 'use window.scrollTo(0,1), that shit is for iOS 7 and below
>>
Does anybody have experience or know any common sense tutorials with PayPal's Express Checkout and recurring payments at least on the front-end side of things? I've been looking through the documentation but it's kinda sparse as far as what it returns.
>>
I had a programming test where i was asked to write fizz buzz but for the numbers 3 and 6. I wrote the solution which I thought is right. But he asked what happens when the number is 6 and I just went blank..

for ($i = 1; $i <= 100; $i++){
if ($i % 3 == 0 && $i % 6 == 0){
print 'FizzBuzz';
} else if ( $i % 3 == 0){
print 'Fizz';
}
else if ($i % 6 == 0){
print 'Buzz';
} else {
print $i;
}
}
>>
How do i revert or remove (css)
display:none;
?

display:all;
or
display:inline-block;
doesn't seem to work
>>
>>59538115
dude, that's not even programming skills he was testing, just logical reasoning. And this is why they do it, anyone can memorize the fizzbuzz code (under 10 lines in your example), but not everyone actually knows how the code works.
>>
>>59538115
Read your own code, and think about it. If I mod 6 is 0 then certainly I mod 3 will be zero, too. Try again.
>>
>>59538115


for ($i = 1; $i <= 100; $i++){
if ($i % 6 == 0){
print 'FizzBuzz';
} else if ( $i % 3 == 0){
print 'Fizz';
} else {
print $i;
}
}
>>
>>59538281
document.getElementById(id).classList.add(myClass) or .remove(myClass)
>>
>>59538343
>>59538287
>>59538536
Thanks guys. I understand now
>>
>>59538536
ahh, I see now. tickled my brain, tnx
>>
>>59539048
Sleepy fag here
Is it bad code you wrote becuase fizbuzz displays twice at 6?
>>
>>59539078
I didn't write it, but what he wrote wasn't wrong, it just had the unnecessary line of
else if ($i % 6 == 0){
print 'Buzz';
}

It's not necessary because any multiples of 6 will be caught on the first line. Buzz will never print because all multiples of 6 are also multiples of 3. That's why >>59538536's solution doesn't have the line to print "Buzz"
>>
>>59536228
Ideally. With no competition and if everyone magically knew about your site?

How many you getting now? My newest launch has only one competitor but many things the competitor doesn't have. The market is 2 million strong. My traffic is 400 a day.

If google blocks adsense on wordpress then that's news to me. Try Amazon affiliate ads. They are at a 12% default now from what I read.
>>
New to php here...

so I have this connect.php file outside my localhost/htdocs folder then I just call it via include "C:\connect.php".

Its way above the document root. is it safe now? I mean nothing is safe but is it still viewable from browsers?

<?php
try{
$pdo = new PDO("mysql:host=localhost;dbname=blabla", "root", "blablabla666");
// Set the PDO error mode to exception
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $error){
die("ERROR: Could not connect. " . $error->getMessage());
}
?>
>>
>>59526713
Hey, to whoever added Florida Atlantic University to the site, please go to

http://campustips.net/register.php

and apply to curate if you want. I can't confirm the validity of the tips at FAU because I don't go there. If you'd like to curate, that'd be great!
>>
>>59539587
No. Anything the user can see is anything printed out from PHP unless you have a messed up web server config that has misconfigured php processing.

However for safe measure, place it in a directory and deny access to it (a .htaccess for Apache, add a directive in nginx)
>>
>>59539587
You cant view php outside of the server.
>>
>>59539587
PHP is what's called a templating engine. What happens with PHP is this:

1.) User goes to http://yourwebsite.com/connect.php

2.) your http server (say, apache) goes to find the file request (connect.php)

3.) apache has a module installed that tells it to do some special processing with .php files. It sees that your file is a .php file, so it does the special processing before it returns the file to the user.

4.) Using the php pre-processor (or interpreter, depending on how you look at it), it interprets EVERYTHING in between the <?php and ?> tags and converts it into whatever text you tell it to convert it to.

5.) This text, after halting (meaning after all while, do, for, etc. loops have finished) will return to the user as plain HTML

So the user SHOULD never see the php code.

However, if you wrote the php wrong (forgot your <?php tags) or if your server isn't configured right (php module is not installed) then the user will be able to see your PHP code, so be careful not to do that. Even if you have no users as of now, chinese and russian webcrawlers browse the internet for fuckups like that to try to steal root passwords.
>>
Anyone else have to work 12 hour days in web dev?

I'm getting paid for it but I would rather have free time since my mind is fucked 7 hours into the shift anyways.
>>
>>59539991
Do you HAVE to work 12 hours a day? I work 2 days a week part time (college student) for 6 hours a day w/ optional lunch break for $15/hr.
>>
>>59539587
>pdo
>not using the_one_and_only_great_and_glorious_mysql_real_escape_string_for_real_this_time

Enjoy getting rekt by Mohammad, Nguyen, Vladimir, Tsang, and Sandeep
>>
>>59539991
Not 12 but 10 hours here. Already planning to leave because anything more than 8 hours is kind of unhealthy in the long run. You could easily recognize a stressed-out person from a fresh person just by looking at his face. 12 hours is stressful even if just sitting on the desk doing nothing.
>>
>>59540059
>not using mysqli
>>
>>59540034
I don't know. 8 hour days are planned but I get work the minute beforr I. Walk out the door
>>
>>59539991
2 years in, never had to work > 8
>>
>>59540238
Tell them you're off the clock, I guess. Do you live in South Korea or Japan? That sounds like an Asian business culture
>>
>>59540346
USA and yes it does.

Everyone here works over 50 hour weeks. I'm already looking.
>>
>>59540410
I'd definitely start looking for a new job. If you find one, try leveraging it with your boss ("I'm working too many hours w/ no overtime" etc.) and if he doesn't give you what you want, walk
>>
>>59539991
>I'm getting paid for it
If you're actually getting paid for the overtime unlike 99% of salaried workers then its not that bad. Especially since web dev isn't "real" work, even if you are working 14 hours a day you don't have excuse to be tired since its not a physical job whatsoever
>>
@59540999
some quality bait right here my dudes
>>
>>59540999
It's mentally exhausting and stressful. I have 36 deadlines as of now.
>>
File: 1483592464606.webm (1MB, 450x472px) Image search: [Google]
1483592464606.webm
1MB, 450x472px
>>59540999
>you don't have excuse to be tired since its not a physical job whatsoever
>>
I am doing my companies website, and when it gets smaller (tablet/phone size) the number and email that are always in the header disappear and its just a Phone and Letter icon, when they click on the logos its the normal mobile thing, it will call our number or email us, but the actual number can't be seen.

The details are still there on the site, on the footer of every page and in the contact us page but I worry that our older customers (we do have a few) won't know to just associate the phone button on mobile to mean they can call by pushing it.

Am I just overthinking this.
>>
File: 1459088807642.gif (21KB, 304x255px) Image search: [Google]
1459088807642.gif
21KB, 304x255px
>lazy loading

Okay /wdg/, teach me.
>>
Please recommend me a good tutorial to learn redux
>>
>>59541926
Just find a old person and ask them to try your website on a phone.
>>
Can sombody explain what is going on here, I'm completely lost.
    // Datadict is a global variable here
$.get(url, function(indata) {
console.log(datadict); // Prints a dict
$("#body-block").html(indata);
console.log(datadict); // Prints nulll
update(datadict); //Errors
console.log(indata);
})

    // Datadict is a global variable here
$.get(url, function(indata) {
console.log(datadict); // Prints a dict
//$("#body-block").html(indata);
console.log(datadict); // Prints a dict
update(datadict); // Works fine
console.log(indata);
})


All I have been able to figure out is that this probably has something to do with asynchrony, but why in the world would the simple jquery call reset my global variable?
>>
>>59541459
How am I wrong?
>>
>>59540999
You must be trolling. Your mind becomes Jelloâ„¢ after 8 hours straight of programming. If you've ever studied or been in school for hours straight, you'll know what mental exhaustion feels like.

>>59541459
Made my day
>>
File: 1490041869745.png (125KB, 500x697px) Image search: [Google]
1490041869745.png
125KB, 500x697px
>>59542290
>>59540999
>>59541459
>>59541185

Pic related is the only acceptable type of real work
>>
>>59542223
Typed the url wrong and was loading the wrong page.
>>
I was making an experiment with html and js, i don't know a shit about programming but i wanted to do this:

A program where you select/submit a swf file,
and then the file is played.

This is how i have it in my head

<!DOCTYPE html>
<html>
<body>

<script>
function myFunction()
{
var fileInput = document.getElementById('flash');
var filename = fileInput.files[0].name;
var parent = $('embed#swf').parent();
var newElement = "<embed src='filename' id='swf'>";

$('embed#swf').remove();
parent.append(newElement);

}
</script>


<input type="file" id="flash">
<button onclick="myFunction()">Play File</button>


<object>
<embed src="blank" id="swf" width="100%" height="100%"></embed>
</object>

</body>
</html>




In my head it is

File is selected
Button is clicked and calls the function

The function saves the filename in a variable
Deletes the embed object and creates a new one with the new src="filename"
The flash animation is played.


i want it to work multiple times
The code didn't work, what i'm doing wrong?

An anon told me about having to use the inpu file thing as form submission but i'm not sure on how to do that.
>>
Retard here, how do I change the spacing between <br>breaks</br>?

I want to make them smaller.
>>
I learned spring and now I wanted to do a semi-serious project with it. my question is how do I know I need gemfire?
>>
File: Brendan Maga.png (557KB, 1036x594px) Image search: [Google]
Brendan Maga.png
557KB, 1036x594px
>>59542594
Sheit I figured it out.
>>
if someone were to program a game engine to run in a web browser (hypothetically) would it best to do it in an HTML 5 canvas...or....?
>>
>>59542574
i just noticed that i'm using jquery and i didn't have it downloaded, fixed that but still doesn't work.
>>
>apply and get called into an interview
>they send me something to fill out before going in
>3 references required and you wont work until we verify them
guess i'm not going there
>>
Retard here again. The font isn't changing, what am I doing wrong?
>>
>>59542908

you wrap the text in a paragraph and apply a style to the paragraph
>>
>>59542780
javascript
>>
>>59542948

yeah i know that but...its probably best not to do it straight in the DOM is it...?
>>
why does /dpt/ have us so much
>>59542917
>>
>>59542947
It worked on my other lines without doing that, but I'll give that a shot.
>>
>>59542965
They don't really understand what we do, and they find it intimidating. People hate what they do not understand
>>
>>59542965

i agree with teasing and making fun of the front end babbies, but full stack devs ought to be respected.
>>
>>59543061
>>59542450
samefag
>>
File: 1485889119752.gif (8KB, 645x773px) Image search: [Google]
1485889119752.gif
8KB, 645x773px
>he's not an asynchronous programmer
>>
File: HW2.gif (5KB, 268x176px) Image search: [Google]
HW2.gif
5KB, 268x176px
>>59542965
>>59543033
>>59543061

this confuses and enrages the /dpt/ poster
>>
How can I get special symbols like ü ß and others without html flipping out and making it all fucked up?
>>
Anyone have experience with setting up a mail server? It sounds like quite a lot of work. Can you use the same SSL cert for a website and mail?

Are there any all-in-one solutions? Mail-in-a-box looks promising.
>>
>>59543533
Declare the correct <meta charset="utf-8"> and use a sane text editor
Or just use the hex code literals
>>
>>59543464

why did you save this as a gif? stop tryin to h4x0rz me

fekkin h4x0rz...


DONT CLICK THAT GIF
>>
>>59543563

i've set up a virtual smtp in IIS but thats it
>>
>>59543602
I clicked on it

>>59543566
Thanks.
>>
>>59543663

clear your cookies and cache asap
>>
File: nervous.jpg (44KB, 569x506px) Image search: [Google]
nervous.jpg
44KB, 569x506px
>>59543877
W-what did he do senpai?
>>
>>59543932
injected his python into your motherboard
>>
File: glassed Pepe.png (234KB, 545x530px) Image search: [Google]
glassed Pepe.png
234KB, 545x530px
>>59543968
Ok, bro.
>>
>>59544018
whered you get this pepe from?
>>
How does frontend work actually look? I'm doing Free Code Camp and the mess with fitting the pieces on page is pretty AIDS...do you always have to do this? It's not even programming, that's web design, and doing it makes me feel like a monkey.
>>
>>59544075
front end work is web design, and it should make you feel like a monkey. there's like 5 times more front end programmers than back end ones
>>
File: intellectual pepe.jpg (25KB, 641x530px) Image search: [Google]
intellectual pepe.jpg
25KB, 641x530px
>>59544065
/tv/ or /pol/ where I browse most, maybe /r9k/, why do you ask, you're not going to steal it, are you?
>>
How long to learn Mocha for js testing?
>>
>>59544107
isn't that where the money's at, though? At least when you aren't some real experienced programmer. I see people paying for wordpress pages everywhere.
>>
>>59501345
Need help.

I'm not new to Web Development, but I am trying to learn to write cleaner code. So i'm trying to use Object-Oriented PHP the right way. (which means classes and all that; not just stdclass'ing everything)

First issue of the day:
<?php

class idea
{
public $base = "cake";
public $all = [
'cherry ' . $base,
'chocolate ' . $base,
'vanilla ' . $base
];
}

header('Content-Type: text/plain');
$firstThought = new idea;
var_dump($firstThought);

?>


So I'm getting an error right off the bat. I've tried using $base and tried using $this->base . Is php trying to tell me that when declaring classes, its no longer OK to use your variables within other variables? Because this simple-as-shit code would totally work if not wrapped in a class declaration.
>>
>>59544256
So i may have found the answer

http://stackoverflow.com/questions/5847905/cannot-use-concatenation-when-declaring-default-class-properties-in-php

They are defined by using one of the keywords public, protected, or private, followed by a normal variable declaration. This declaration may include an initialization, but this initialization must be a constant value--that is, it must be able to be evaluated at compile time and must not depend on run-time information in order to be evaluated.

I thought php was an interpreted language? I don't compile my scripts. What kind of retarded bullshit is this?
>>
I can see why people wanted web assembly, but why the fuck did it have to be merged into http? why not make a separate protocol for binary apps? that would make much more sense then sending binary executables over the hyper text transfer protocol.
>>
Anyone here do affiliate marketing?
>>
>>59544928
Advertising/tracking/affiliate linking is the cancer that is killing the internet.
>>
>>59545036
It's the future of our economy.


What you mean to say is adsense is the cancer that's killing the internet.
>>
>>59544176
web dev won't get you experience programming, it'll get you experience web dev'ing. don't get stuck in a mediocre paying webdev spot with no upward potential like every millenial
>>
>>59539587
Haven't used PHP in 10 years or so, and barely understand the question. What exactly is the advantage of letting the source files position in the file system determine what code gets executed for which URLs?

Seems much better to explicitly define routes in a central location, as practically all of the popular micro-frameworks do. Doing it this way seems like asking for trouble, especially for beginners.
>>
Who here uses TypeScript?

I've taken over a Node.js codebase and it isn't exactly stellar. I feel I need to factor out all the business logic and create a proper model to keep it maintainable. So my first thought was to see if I could move the back-end to Java, which may not be a fun language, but it has a ton of tooling for this kind of stuff. But that requires convincing management, and it would entail reimplementing a lot of stuff that already "just werks".

So I started looking into alternatives and thought maybe TypeScript could be an option. Its more Java-like features would let me have the IDE do a lot more of the thinking for me, but it would not require a huge investment since it won't disrupt any existing code, it's mainly just adding type signatures and encapsulation, and even then it's optional.
>>
What's the simplest way to do this?

Working on a Real Estate Website and system, need to upload a picture and convert (crop) it to pre-defined sizes because wordpress needs it that way.

Imagick?
Cron job on a folder?
>>
>>59548411

The former
>>
>>59547076

Whats typescript?
>>
Should I be using a script to make a dropdown list with values or hardcode it? When should you hardcode something vs using javascript and saving yourself writing some boring lines?
>>
why should i use anything other then php for simple websites?
>>
>guy interviews for my place of employment
>they find out he only knows html
>he doesn't even know what a string is.
>lied on resume saying he knew programming

What the fuck did he think was going to happen?
>>
>>59548900
If it's dynamic you make it dynamic.

Honestly it sounds like you heard "hardcode" and just wanted to use it in a sentence.
>>
>>59548411
Imagick or plupload to do the resize client-side.

I prefer plupload.
>>
>>59545291
Web dev goes straight to CTO. What are you talking about?
>>
File: Избор_105.png (38KB, 964x321px) Image search: [Google]
Избор_105.png
38KB, 964x321px
why transmission-cli downloading wont start?
>>
>>59549017
What's the error say?
>>
>>59549017
no error, just wont connect to peers and start downloading
>>
File: 1490060386734.png (187KB, 758x631px) Image search: [Google]
1490060386734.png
187KB, 758x631px
>>59548957
Imagine knowing only OF html. Not being aware of css, js, php at all.

Then you learn html and think that you're a 'junior webdev' and that you'll learn other stuff through work.

Seems kind of plausible
>>
>>59547076
I fucking love Typescript.
>>
>>59548947
There is absolutely no reason to, unless you're trying to learn something else. PHP 5.6/7 is actually pretty modern, and stable unlike flavor of the week javascript/node stuff.
>>
>>59548947
Because it's overkill for simple websites?
>>
>>59545291
the highest paid person (executives included) at the top 20 in the world enterprise i work at handles their social media
>>
>>59545291
I wish I had a webdev job though....it's only for hipster, childless white and maybe indian people though. And I'm none of those things :(
>>
>>59550532
im a hipster, childless spic and i got a comfy webdev job. first job too, and i somehow ended up the lead/only developer because everyone else got laid off kek
>>
File: 1487620622755.gif (1MB, 540x540px) Image search: [Google]
1487620622755.gif
1MB, 540x540px
>>59547076
yeah I use it
dev tools still playing catchup
works for internal apps cause u don't need to transpile or whatever for every browser ever
>>
wait
angular 4.0?
>>
>>59550786
I never got round to doing 2
just use react
>>
>>59550786
It's the same thing as Angular 2.
>>
>>59549399
Imagine being that guy and being told he knows less at 26 than most of the employees did by 12.

I just can't imagine that fellas embarrassment.
>>
>>59544256
>>59544379

So. Despite my initial hardships, I did decide to keep going and try to learn to use some object-oriented php. I'm pretty sure I fucked the public/protected/private shit all up. And this probably is more unclean code that is just horrible.

BUT! I did achieve the result I was attempting to achieve.

At work we have to use this terrible thing called emaintenance. It's terrible. You have to manually hit a refresh button to check for new tickets. And there's no fucking api.

Literally what happens is:
You click the refresh button.
Some JS creates a new "WidgetRefresh" url. (using some custom id that was embedded in the dashboard page)
Your browser ajax's the url and gets... some html containing an iframe.
That html is then poped into a div, causing the iframe to become active.
The browser hits the iframe, and gets an html table with a bunch of retarded shit like scripts embedded in cells. And just not well-formed html.

Who even does that? They literally made their backend generate a random html page every time there's a change in the ticket status, and you have to hit up the server to effectively query the url for the most recent html page.

Why not just use a json api and a database?

Well, here I come in. I decided to use my hobby to create an automatic refreshing ticket-status page. It uses php's DOMDocument class to parse these non-well-formed html pages, and can automagically simulate the whole process. From curl'ing the dashboard, to getting the id and querying the refreshWidget, to querying the iframe, to parsing the iframe response.

And it spits out some json. (like emaintenance should've been doing all along)

With my backend in place, it was easy to create an auto-refreshing ticket display system. No more button-clicking.
>>
>>59551884
>>
how do i know if my apache has sql installed?
>>
>>59551918
What operating system are you using?
>>
>>59549688
Typescript is water is a desert of idiocy.
>>
>>59552004
>is
*in

See. Just goes to show: You call other people idiots and you're going to look like an idiot.
>>
>>59551918
I've never heard of Apache having SQL installed.

What's that, some kind of mod that embeds SQLite or something? Seems pointless.
>>
>>59536766
I got an idea. Look at the bottom of my code. I am sending a GET request for a *.html file. What if I just sent request for a URL instead? Then Express would get involved, and since it's server side I could check authentication there and perform some server-side logic to determine what HTML to send back in the response.

Is that a respectable, professional solution or would real web devs laugh at me?
>>
>>59552492
nvm got it
>>
File: Screenshot_36.png (8KB, 700x65px) Image search: [Google]
Screenshot_36.png
8KB, 700x65px
>>59552506
I need to correct myself. Express is getting involved in both cases, but with the way my code is now, Express is just giving up the html files I request.

I need to change that, which should be easy.
>>
>>59552606
Uh just use AJAX to make calls to your API, have React or Vue render your page.

You are making it kinda complicated lol.
https://github.com/pagekit/vue-resource
Use that for HTTP calls in Vue
>>
>>59551884
what did you do for the automagically refreshing ticket status ? long-polling ? websockets ?
Thread posts: 312
Thread images: 30


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

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


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.