[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: 323
Thread images: 22

File: 1484161924115.png (731KB, 824x553px) Image search: [Google]
1484161924115.png
731KB, 824x553px
Java is actually good edition

>This season's Advent of Code:
https://adventofcode.com/2016/

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

>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
https://gist.github.com/dypsilon/5819528

>Useful tools
https://pastebin.com/q5nB1Npt/
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/

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

>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
>>
In javascript I have a function that picks to random playing cards, either suited or not suited. It also randomizes what suit the cards are.

I have it so it picks the 2 cards (AKs=Ace King suited ect), then it adds a suit to the first card at random, checks to see if there is an "s" to symbolize suited and if there is adds the same suit to the second card and appends both cards images too the page.

Does anyone have any ideas about how I can make it so if the 2 cards selected are not suited, the 2nd card will be assigned a suit that is NOT the same as the first?
>>
File: youre_browser_is_shit.png (44KB, 870x378px) Image search: [Google]
youre_browser_is_shit.png
44KB, 870x378px
>>58483364
ignore older browsers !
>>
>>58483521
>>58483568
Do you use cross browser testing tools ?
Are these any gud ?
>>
>>58483719
well this might be the most straight forward way of doing it
>>
I can not get nginx to send me emails on digitalocean.

Anyone know how to solve this?

Their tutorials don't work for some reason. None of them.
>>
>>58483364

Ok I almost have this, the issue is, I splice the info out of the array, but how do I reset it so that the array is back to default when the function starts again?

After a few iterations of the function I have emptied the array.
>>
I have an interview and part of it is writing a small application in Angular 2. I'm almost done but a requirement was writing tests.
What the hell can you even test in Angular 2? All I'm doing is literally a glorified Tour of Heroes. Create a mock service and then check if the component displays things properly?
Please help.
>>
why does everything have be on top of 200 layered libraries
>>
Why isn't there a thing like

%mobile {


}

to encapsulate all your mobile CSS?

What is the media query best for mobile phones.
>>
>>58485087
Never really did tests on front end stuff but i guess you could checkout dedicated js testing tools like karma + jasmine or whatever
>>
>>58483842
you need a mail server famalam
>>
can you recommend any javascript-based image gallery viewer?
>>
>>58486023
Yes, neither are working.
>>
>>58486844
make sure the problem really is your server not sending anything rather than email provider you're sending mail to moving it to spam or straight up blocking it because it come from an untrusted source
>>
>>58485575
What do you think @media is for?
Also depends on your site.
>>
What libraries or functions should I use to slow down an iteration so it seems like an animation.

e.g. I have the following json
[
{name:"node 1", date:"2017-01-01"},
{name:"node 2", date:"2017-01-02"},
{name:"node 3", date:"2017-01-04"},
{name:"node 4", date:"2017-01-08"}
...
]

And I want to add each node to a network chart but I want to do so with respect to their date. (node 2 will be added much quicker than node 4)
It was also be cool to have a slider so I could slide to a certain date and it would show that state
>>
>>58486965
I think digitalocean counts as an untrusted source.

Can I rig these things up to send through gmail?
>>
>>58482814
>codingrainbow
Has been renamed into "The coding train".
https://www.youtube.com/watch?v=S4yQYiAECnM
>>
>>58488296
To send through gmail set your client to use gmail's imap and smtp
To use your own mailserver make sure to look into recipient's spam box
>>
Portfolio builder idea:
Javascript fortunate cookie website.

API to use: http://www.yerkee.com/api/fortune

This can be as simple as you want it to be.
>>
File: bun.gif (411KB, 499x281px) Image search: [Google]
bun.gif
411KB, 499x281px
If I wanted to become a php dev, what would be some goals to work towards for an entry level position?

Pic unrelated.
>>
>>58489921
learn php, learn sql, database setup and management, learn big php framework
>>
>>58490173
Any kind of specific projects I should be working on to make people take notice anon?
>>
File: 1479579780970.jpg (83KB, 1024x536px) Image search: [Google]
1479579780970.jpg
83KB, 1024x536px
>Taking final web development course in my college's IT program
>It's all Ruby/Rails
>>
>>58490285
You could make small demo projects like anon from a thread ago and his todo app or clone something you use regularly like a mail client, rss/podcast aggregator or whatever.
There also are some open source projects written in php you might be able to contribute to or write plugins for.
Also if you want to work with wordpress stuff you can learn how to set a site up and do themes or plugins
>>
>>58490394
Thanks for the suggestions anon. I don't particularly want to work with WordPress but I know there's a ton of work out there. Probably once you learn the stuff it becomes super easy too. Which could be a double edged sword.
>>
>>58490305
academics will always be a lil behind on cutting edge business preferences
>>
>>58491446
What's the cutting edge business preference right now?
>>
anyone here use freecodecamp? Trying to learn webdev but trying to decide on what learning/mooc thing to choose.
>>
>>58490285
I'm in the same boat you are i'm guessing and have done some research

Do simple rip offs of other sties is something I see alot
(finished small projects always better then unfinished big ones)

Try going through as many laracasts as possible/all probably a good idea as well as getting a couple side projects done (probably what I'm going to end up doing) There aren't that many videos and its' over most concepts I imagine you will be asked about or have to do stuff with php entry jobs.

>>58490735
it seems very soul sucking and it's only my back up if I can't find anything else (unlikely i imagine/hopefully)

>>58493348
so long as you are actively doing stuff it's good, you will probably end up switching around alot anyway. bento.io is something you might want to look at too.
(i kind of started with fcc but not really but for html/css stuff for example did stuff there everything on bento.io pretty much, some random stuff I saw recommended like those flexbox games.) Just try to maintain actively doing stuff and you will improve. FCC /theodinproject are pretty nice tracks you can follow and later FCC Projects are recommended to peopel even not doing FCC so it wouldnt hurt to go along with it. If you dont understand something totally (fcc is pretty minimal) just google around, check bento.io, or search good resorueces to learn X on google or reddit or something.
>>
>>58489921
Also forgot to mention, best bet will always be just looking at job postings in your area for things to flesh out your resume. Tons of PHP jobs near me appreciate React and noSql stuff for example.
>>
How does gfycat make their thumbnails animate? Its just a picture, but if you hover it starts playing the video. Doesnt that waste shitton of bandwidth? How is that possible/good when it would download shitton of videos at once when just scrolling.

Am i missing something?
>>
File: 1473555401195.png (1MB, 1357x1281px) Image search: [Google]
1473555401195.png
1MB, 1357x1281px
>tfw not an attractive female
>tfw no 90k likes for being retarded.

>tfw life on silver platter but too retarded to do anything about it.
>>
>>58494676
The video is loaded on-demand when you move your mouse over the thumbnail, so most of the videos will never load. Also it is very compressed, the quality is horrible and the resolution is super tiny but it's okay for a preview video.
>>
>>58482814
I'm making a chrome extension that downloads youtube videos using youtube-dl. can I call youtube-dl in javascript?
>>
>>58495634
For personal use? Then run a server calling youtube-dl on your PC and make a HTTP request
>>
>>58495634
https://developer.chrome.com/extensions/runtime#method-connectNative
>>
Please help.

>>58496387
>>58496398
>>
>>58496456
press F12, go to network, press save button and then replicate whatever it did.
>>
File: a.png (103KB, 1053x600px) Image search: [Google]
a.png
103KB, 1053x600px
>>58496496

I just checked the request made by my browser.
The data looks a bit weird, not like the other one I had sent, for example during login. Is this a special case? On the top is the request during login, which works flawlessly. On the bottom is the request that doesn't change anything.
>>
What is the best way to create a cms?
>>
>>58496855
I mean, with Angular, django, ruby or php?
>>
>>58496738
Top one is a normal form data request. That means the actual body is something like "csrfmiddlewaretoken=[...]&next=[...]&username=[...]&etcetc"

Bottom one is a multipart/form-data request, the part on the right is the actual body.

They're two different ways to send form data, whether it works not depends on what the server is expecting (if it's expecting normal form data and you're sending multipart form data, it's obviously not gonna work)
>>
I can put something in a div/span of a certain class.
Or I could just make said thing that class.
Is there a preferred or standard way to decide between these options?
>>
GraphQL any good?
>>
>>58496977
no.
I'd prefer not to have an extra div around something, but it depends on what you are going to do with it.
>>
>>58496966

Thanks for the push in the right direction.
>>
>>58482814
Got my first junior web dev job recently. Fucking hate the culture, the lack of a lunch (or any) break, the requirement to have constant meetings after work.

When is it acceptable to quit? I would quite now and find another job, but I don't want it to look strange on my CV. Maybe 6 months?
>>
>>58498161
I'd say at least 6 months, but don't think you have to put up with it for your CV sake, start looking for another job now.

Also if you want a break or lunch then take a fucking break. You may be working with autists who feel it necessary to kill themselves through work. You're entitled to a break and it's healthy to do so
>>
>>58498161
all the time.
what country you're in? surely having no break is against the law.
sue the shit out of them.
>>
>>58498392
I'm just a junior dev, I feel like I'm not experienced enough to just look for another job and get it easily. I don't even know how I was hired at my current job.

>>58498394
UK. I want to move country so bad. There's another issue. Who the fuck would hire me abroad if I couldn't even stick to my first job for more than a few months.

Everyone tells me a year is best but fuck it I can't
>>
>>58498588
https://www.gov.uk/rest-breaks-work/overview
Go to your chamber of labour or whatever it's called in the UK and tell them.
>>
>>58498588
I'm literally you. I moved from wales 6 months ago to sweden for my first real junior role. Don't feel so fraudulent that someone hired you even though you feel you like you don't somehow deserve your position there.

Kick yourself up the ass, grow some balls and start taking what you want. I'd suggest using linked in to apply to jobs in countries you want to go to and go from there. Get yourself a strong CV and portfolio and you should be good to go.
>>
>>58498649
Hey man, I was actually thinking of moving somewhere in Scandinavia.

How did you get on with the language difference? Did you talk in English with your colleagues/boss? What was the interview like? Any tips on moving there would be great. I have only about £1k saved up too so I don't know how that would work.

The only thing stopping me is my retarded anxiety. I have very bad anxiety, and take meds for it (beta-blockers). They're the only thing which help me get through work. I have no idea how I'd be able to move to a different country without them.
>>
Web Development General, folks.
With 0 development and 100% whining about not getting a job.

This general should just die or get renamed.
>>
>>58482814
>Java is actually good edition
of course it is, but justify the RAM usage for a small project
>>
>>58498794

> How did you get on with the language difference?
Everyone speaks english, and that's true for all the scandinavian countries (especially the capitols, which i've lived in 2 out of 3 of them)

> What was the interview like?
I had one with an external recruitment company over Skype which consisted of questions about me personally (how old i am, what my aspirations are, where i've worked etc) then i had another Skype interview with the company where they asked about what i've worked with in the past, did I know key technologies (git, the framework they use) and basic thoughts on web dev. I then got a technical assesment on inspecting the model and view of one of the partials they use in the app. I went beyond that and showed a basic CRUD app in backbone to show I'm not a fuckwit. They offered me the job about a week later.

> Any tips on moving there would be great

The housing market in stockholm is fucked so you'll be spending a lot more on accommodation than a native would. Oslo wasn't much easier either as I found they prefer letting rooms to other scandis but definitely a bit easier than stockholm. Norway was easier to get a person number and bank account than sweden mind.

>I have very bad anxiety, and take meds for it (beta-blockers)

You can ask your GP for a 3 month supply to move away with then by the time you get yourself sorted here then you can just get it from the GP in the country you move to. The surgery shouldn't give you any problems if it's beta-blockers. It's not like they can be abused or as if they're expensive.

If you're that worried though get an e111 health card. It'll entitle you to health care in europe until you have social security in the country you move to get prescriptions as normal.

As long as you man up and take what you deserve then you'll make this work. Good luck anon
>>
In JS how do you write a variable that's "equal" to an int variable without being an int?
>>
>>58499098
Wow thanks anon, that really helped. I really hope I can make this work too. I feel like I fucked up in this country and my childhood was traumatising so I need to move away.

Best of luck in your life too!
>>
>>58499183
come on you don't even know your fucking operators read the fucking specs
>>
https://wrvc.github.io/
rate my website
>>
>>58499325
> * valgrind gave no errors which means this is a professional program desu
>>
>>58499200
No problem. You can do anything if you put your mind to it mate

>>58499183

var int = 5;
var string = "Five!"

if (int === string.length) {
console.log("the string is equal to the int")
} else {
console.log("the string is NOT equal to the int")
}



Like that?
>>
>>58499393
its true tho
>>
>>58499206
>>58499403
I know my operators, I was talking about passing by reference vs value. Figured it out though, no worries.
>>
Newfag here, so please forgive my ignorance.
How would you implement archiving in the backend? Let's say you have a CMS with messages and they can be archived, e.g. in order not to be shown.
Would you create an extra table for archived messages, or would you add a column/flag in the regular table for messages?
The former would require an additional table, but the latter would not need an additional check for the archived flag.
Am I thinking completely wrongly about it?
>>
>>58499600
Look for existing plugins / themes for your cms that do that or make your own.
Otherwise export existing db to a new backup db then delete messages you want to hide on production site, maybe setup new site behind authentication to interact with backup db.
>>
>>58499781
Thanks. I am making my own to learn that stuff.
I was asking on a conceptual level which solution would be better, but I suppose it doesn't hurt to look around how other platforms have implemented this functionality.
>>
File: atlasmemed.jpg (50KB, 400x247px) Image search: [Google]
atlasmemed.jpg
50KB, 400x247px
Hello,

I’m planning to develop a web-based platform vaguely like Twitter. Using the site as an example, I’d like to know:

>Which languages would I have to learn to develop the front-end of Twitter?
>Which languages would I have to learn to develop the back-end of Twitter?
>How much would it cost for me to deploy a site like Twitter once it was made?
>What would be a reasonable estimate of the time it'd take me to learn the languages required, and actually code something like Twitter from scratch?

Thanks!
>>
I want people to be able to tweet or post a picture on facebook that I generate client-side.

Anyone have any idea how to do this?

Basically I turn a div into an image with JS and want them to be able to share it immediately on social media. The image will not be saved on the server.
>>
I literally can't get apache2 to work. I'm stuck behind a 403 permission denied error for the past week.
>company says they're doing a new years check up on their servers or some shit
>shut down servers and restart it
>means my apache2 needs to restart as well
>service apache2 start
>error error error
>what the fuck
>fix errors, permission denied
It was fucking working before!
>>
>>58502058
Use facebook and twitter api.
Requires you to setup oauth authentication so your user log in to your application with their twitter or facebook logins
>>
>>58500536
glhf
>>
>>58502195
try looking into every config file, your firewall config might have been reset as well
>>
If I'm receiving hundreds of pages from a server through ajax in an array, how do i just put all the items on one page.
basically i have a stream of data that has an object called pager and that includes a parameter per_page.

How do I manipulate this parameter so that I can receive everything?
>>
If I'm reading this correct, I need to start a server to create a db? However, I seem to need a configuration file to start the server. Anyone here have experience with postgres?
>>
>>58502195
chown everything for www-data
>>
>>58489921
Just learn how to properly implement sql injection vulnerabilities in your code and you'll be fine
>>
whats a good first node project? something i can CRUD?
>>
>>58505048
Clone of a website you use/like
Basic social media site
Movie/book/game/etc review site
CMS
Stock tracking thing
>>
>>58505236

Is there a point in using node if you don't have a database? I don't think making a static basic site that doesn't do much would be very beneficial for learning node. Am I right?
>>
>>58500536
1. html css js jquery
2. a range of options, php, nodejs, >python, etc
3. depends on the amount of traffic, twitter is big so it costs a lot
4. a year
>>
How do I run JavaScript inside the php file I'm requesting with AJAX post?

I'm trying to set the background color of a div created from the PHP.
>>
>>58505469
>Is there a point in using node if you don't have a database?
Plenty of reasons. Node (and any other backend environment) gives you access to the server's file system and software. For example, you could make a site that accepts a video file, re-encodes it with ffmpeg, and returns it to the client. Maybe you want to make a basic websocket chat room. No need for a database, but you need a centralized server for clients to pub/sub to. Maybe you want to be able to view status information about your server over the internet. You could write a script that collects various data and formats it into html. (Or you could ssh in and run top, but whatever.)

>I don't think making a static basic site that doesn't do much would be very beneficial for learning node. Am I right?
Not necessarily. As I said, there's lots of stuff you can do without a database. That said, databases aren't that hard and they certainly have plenty of uses.
>>
>>58505675

you could echo js into script tags, probably not the smartest way to do it but when you mix php with javascript you run into these issues. Thats why a lot of people are ditching php and using js for both front end and back end

>>58505705

thanks m8
>>
So I'm making a web app that basically takes some information from the user and then displays it nicely in a word document, however I have no clue in how to make it so the user can download this document after, someone knows if there is some kind of tutorial on this? I am using React if that matters.
>>
>>58505838

i used a js script that let me give users a download .csv file button, theres gotta be something out there for a word doc. Just search on google...thats what i did
>>
Made 33 cents today with AdSense.

Time to buy a house.
>>
>>58505675
There are so many things wrong with that I assume you're jus trolling, but in case it helps someone else:

- If you're using ajax, you almost certainly want to return json or xml to be consumed by the client.
- when a php file is requested, the server runs the file through the php interpreter, then returns the resulting page as html (or xml, json, whatever). Any javascript on the page will run in the client's browser after the client receives the response. If you want to return an html page with javascript embedded in it, you just put it in a <script> tag, exactly the same as a normal html file. (because as far as the browser is concerned, it *is* a normal html file.)
- To change the background color of a div, select it by class, id, etc and change <element>.style.backgroundColor to the color you want. Read this for details:
http://www.w3schools.com/jsref/prop_html_style.asp

>>58505838
Plain-text or markdown file would be easy to generate, but word doc files are actually a strange form of xml with some proprietary MS shit thrown in. There are a few libraries for different languages floating around, but it definitely doesn't seem like something you can do frontend only.

>>58505900
csv == comma separated values. It's literally just a text file with the values separated by commas. Very easy to generate programmatically. Not really anywhere near the same level of complexity.
>>
>>58506208
What are you showing ads on? And how many, etc? Google analytics has some pretty good tools to figure out what kind of demographics your site is popular with, if you didn't know. Figure that out and market the shit out of it.
>>
>>58506463
How many ads should I have? I just have 1 banner at the top.

My market is /r9k/
>>
>>58506208

this is why having a job is good, my friends
>>
>>58502916
install postgres with package manager, start service
shouldnt need to mess with configfile too much
>>
>>58506593
1. Put more ads on the page
2. Advertise in some way. More eyeballs means more money.
3. Look into alternate revenue streams. An ebook, patreon, etc.

Also,
>My market is /r9k/
Gross
>>
>>58506593
Alternatively start a podcast featuring famous /r9k/ tripfags so you can get sponsored ads in there as well with promotionnal codes.
I heard sponsors make money
>>
>>58506814
I'm not worried about this site making money. It's not meant to.
I'm just testing adsense on an old site before integrating with 2 new projects and admob with cordova apps.

I'm pretty sure most of that 35 cents was from my youtube channel I just started anyways.
>>
Im a total beginner to web development, what is a good development environment for Javascript?, how does it work exactly? The interlap of http and javascript
>>
>>58506832
Is cordova good ?
Would i be able to make a website into mobile app with minimal effort ?
>>
>>58506897
>what is a good development environment for Javascript?
Vim, emacs, atom, sublime, brackets, vs code, pretty much anything else with syntax highlighting and line numbers.


>how does it work exactly? The interlap of http and javascript
https://en.wikipedia.org/wiki/Javascript
>>
I'm trying to do some web scraping. But it looks like it's going to be a bitch.
Is there an easy way to figure out how to send a request to a site's server and get JSON back?
I've been inspecting and digging around with firebug. Just not sure where to look.
Being able to do that would be much easier than having to manually find and copy xpaths.
>>
>>58506931
Yes, it's potato easy.
>>
>>58507008
Can't wait to make these pesky mobile devs obsolete
>>
So I offered to make this guy a website in return for a lute.

He wants to do it.
>>
i installed node on ubuntu but can't find it anywhere. Only thing i found was a nodejs folder in my /usr/lib but there's nothing in it
>>
Hello, I'm currently taking a python class as an elective in school and I need some help. Is this the thread to ask or should I be posting elsewhere? Also, is there an easy way to format the code here instead of just copy and pasting it in so it displays a bit better in my post?
>>
>>58508319
search the catalog for dpt
>>
>>58508393
Didn't see that thread. Thanks.
>>
Am I retarded? I can't figure out the simplified form of this. Please help

if (a || !b){
if (!a && !b){
do X
}
do Y
}
>>
>>58508420
if ( !b ){}
>>
>>58508420

theres no point in the first if statement right? idk. i would guess

if (!a && !b)
do X
else
do Y
>>
>>58489921
>Pic unrelated
I see what you FUCKING did there.
>>
>>58508506
Then it would fail to do Y when (!a && !b)
>>
Magento Commerce or OpenCart?

I do PHP and JS.
>>
>>58508420
if (!b) {
if (!a) {
do X;
}

do Y;
}
>>
>>58508736
I do all PHP and JS.

What do you do? Python or Ruby? lel
>>
>>58508761
Then it won't do Y if a and b are both true
>>
>>58508791
Okay, then it should be:
if (a || !b) {
if (!a) {
do X;
}

do Y;
}

Just tested it and this gives the same results as the original code.
>>
>>58508791

youre not looking for that are you? the original code doesn't say both a and b need to be true to do Y
>>
>>58482814
Reposting from /flgt/ because I need help fast.

Hi all, how do you restrict apache access to a Centos 7 folder? IE I dont want a folder that is being hosted on my Cent OS box to be publicly accessible.
>>
Where do I go to learn JS? Is it like python basically? Where can I practice writing JS code (an IDE of some sort)
>>
>>58509562
piratebay the foundations of programming: fundamentals. i think it was released by pluralsight, or lynda. simon allardice is the instructor.
>>
>>58509618
I already have some experience in programming, final year cs student so I just need something specific about javascript, or is that book about JS? Preferably I dont want to read a thick book, I just want to know the language "good enough"
>>
>>58509658
If you don't know how to read the top bar or google such basic things I don't really think a book will help you.

try bento.io and look and the resources they have there
>>
>>58509658

dude just amazon or something. Google. Do research. The info is out there...
>>
does anyone here know how to use .when properly with ajax???
>>
>>58508041
why do you need to find it? type 'node' in a terminal
>>
>>58509562
>>58509658
https://developer.mozilla.org/en-US/docs/Web/JavaScript
>>
>>58509658

Dude, just read the 'thick book'. No point scrounging around for a bunch of bullshit tutorials that are just lifting and garbling information from the real books anyways.

Sometimes the difference between a good developer and a shitty developer is only that the good developer RTFM
>>
>tfw its 1:45am and you have to be at work at 7:00am
>>
>>58511121
what job
>>
I'm a novice web dev. I have a good grasp of HTML/CSS and have done some basic stuff with JS/JQuery. I was thinking for my first project to try and make a simple flashcards revision app. I know this has been done probably 1000 times but I felt it was a challenging first project for a beginner

Thoughts? Should I try and be more original with my project ideas? At this stage I'm literally learning as I go
>>
>>58512305
>I know this has been done probably 1000 times
Who gives a shit? It hasn't been done 1000 times by you. Practice is practice.
>>
I am trying to get my hand around regex for my javascript app.

$("td:contains(ANY TWO LETTERS)" ).toggleClass("highlighted");


How do I make the contains in the bracket search for, funnily enough, any 2 letters (It will only ever need to be capital letters)
>>
>>58512767
Regex is always a pain in the ass to use, but extremely useful. A good resource to use for practicing regex is a site called regexr. (spam filter keeps catching it, just google it)

To match any two capital letters (exactly two), you'd use
/[A-Z]{2}/
>>
>>58512305
you're not trying to reinvent the wheel but to learn how the wheel works so its k
otherwise try to practise with projects copying stuff you already use so you're familiar with the functionalities you try to implement
>>
>>58512305
perfectly fine as learning

> At this stage I'm literally learning as I go
m8 i made tons of shitty webapps fresh out of college as an overpaid consultant until my experience caught up to my responsibilities

just remember to keep the drive to self improve, the javascript eco system is so vast and fast moving it's easy to become complacent
>>
>>58512963

Cheers mate, that worked nicely
>>
>>58513181
>>58513052

Good to hear. Thanks m8s
>>
what should I read if I need to know the very, very basics of GUI design?

i have to design a single dialog box, but it has to be good.
>>
hate to be that guy but how do i into webdev?

what does everyone here use?
>>
>>58514365
Scroll up
>>
>>58514365
You need to learn html and css to make static pages.
Then learn any server side language depending on your meme level and also how to setup and use databases so you can put server generated content on your web page.
Afterwards learn a framework for your language of choice to allow you to do the same shit as before in one third of the time.
Finally learn javascript to add bloat and improve user experience on your sites, bonus points for using hipster frameworks.
>>
>>58514511
I am familiar with python already so I'm playing around with django right now. How does django work into this? This is what you mean by framework and python would be server side? And I need to learn html and css additionally?

Do i really have to learrn javascript too?
>>
>>58509094
Please, I'm an expert-level ColdFusion developer and the job options are limitless.
>>
>>58514617
you have to know enough about everything to learn what to use or not use
>>
>>58512386
I do.

If a project has been done 1000 times then change it slightly so it hasn't.

Like a flashcard whatever thing he's making. How about let people create and share their own flashcards. Grats, now you have the goto flashcard site if that doesn't exist already.
Maybe a leaderboard to gamify so some people will keep coming back to see your ads.
>>
>>58514617
Django is a python framework for web dev, it should provide you apis to do common stuff like interface with http requests and database so you don't have to write your own db driver for example (i never used python so not sure about all the features or whatever)
So ye python on server in this case, but you might want to learn how to python without too many additional libraries first to decrease information overhead and get basis in that language first
html and css mandatory
javascript is easymode once you know how to program and is used everywhere so learn to use it as well
>>
>>58514763
theres like a hundred sites for creating saving and sharing flash cards online
>>
>>58508420
if (!a && !b){
do X;
} else if { A || !B) {
do Y;
}
>>
I started my first real job lately and we use React, so I'm getting experience in front-end dev. I have to write my engineering thesis next semester - an android keyboard like swype. I was wondering if there's a framework that would let me write the damn thing using javascript/html/css?
>>
>>58514617
>Do i really have to learrn javascript too?
Not if you are ok with static pages

>>58514967
>I started my first real job lately and we use React, so I'm getting experience in front-end dev. I have to write my engineering thesis next semester - an android keyboard like swype. I was wondering if there's a framework that would let me write the damn thing using javascript/html/css?
You certainly can write apps with the usual webstack techs, I have no idea how the keyboard interacts with the rest of the system, but I wouldn't be surprised if this was a possibility
>>
File: penn_jillette.jpg (31KB, 300x400px) Image search: [Google]
penn_jillette.jpg
31KB, 300x400px
>create complicated SVG animation in pure CSS
>works in Chrome
>works in Firefox
>works in Safari
>doesn't work in IE Edge

Welp... should I care? Target audience is a technical crowd, hope they don't use IE that much. So my thought was pure CSS > JavaScript since a lot of techies disable that.
>>
>>58515133
yer good just stop telling people and dont put it in your portfolio
>>
>>58515130
>You certainly can write apps with the usual webstack techs, I have no idea how the keyboard interacts with the rest of the system, but I wouldn't be surprised if this was a possibility
Could give me some directions what to look up, please?
>>
>>58515166
cordova is supposed to enable you to turn web apps into mobile apps, maybe try that
>>
>>58514867
I'm giving an example. I'm not going to research the idea for you.
>>
>>58515166
angular2 + nativeScript builds real native applications for mobiles, that might work too
>>
>>58515133
if (/Trident|Edge/.test(navigator.userAgent)) {
document.documentElement.innerHTML = '';
alert("FUCK OFF");
}
>>
>tfw you realize there's literally no point in not using node
>insanely fast
>non-blocking
>cool logo
>makes all the old senior citizen php devs look like shit
>feelsgoddman.jpg
>>
>>58515489
>i hate to learn
Pajeet you fool
>>
>>58515133
>JavaScript since a lot of techies disable that
only retards do that, nothing to worry about
>>
>>58515133
Fuck anyone that disabled javascript.
>>
>>58493348
I used it, it's decent for HTML CSS and JavaScript but the problem is they teach you more jQuery than JavaScript. what FCC is really good for is their projects though, I would teach yourself everything and then come back to FreeCodeCamp to do their practice projects for each section

once you're past JavaScript you're better off going with something else, it's mostly for beginners
>>
is it possible for my web app to read directly from a .csv file on the server?
>>
Are algorithms necessary when learning javascript?
>>
>>58516049

not really but if you want to be a good programmer it's necessary
>>
>>58491446
Ruby on Rails is pretty current..
>>
I'm trying to set up a PL/SQL procedure which displays country details from a table after accepting a country name as an in parameter and I continue to get a non-descript "Compilation unit analysis terminated" error.

CREATE OR REPLACE PROCEDURE country_demographics
(p_countryName in countries.country_name%TYPE := country_name,
p_customRecord out record_country_demographics)
IS
CURSOR cur_countries is
SELECT country_name, location, capitol, population, airports, climate
FROM countries
WHERE countries.country_name = p_countryName;
BEGIN
OPEN cur_countries;
SELECT country_name, location, capitol, population, airports, climate INTO p_customRecord
FROM COUNTRIES
WHERE countries.country_name = p_countryName;
CLOSE cur_countries;
EXCEPTION
WHEN NO_DATA_FOUND then
DBMS_OUTPUT.put_line ('This country does not exist!');
END


I've been bashing my head against this for a while now and feel like i'm getting nowhere. Any idea where i'm fucking up?
>>
>>58515212
>>58515477
Thx for the suggestions
>>
>>58515580
I just prefer Flask over Express, but I'll take a look at Electron/Ionic sometime soon
>>
i installed node and a node_modules folder got put in program files and also under my user account. Which one do i use?
>>
>>58517311

nevermind i guess i use the folder which has the package.json file in it. Don't know why it created 2 node_module folders....
>>
File: 0162017152352.jpg (98KB, 640x480px) Image search: [Google]
0162017152352.jpg
98KB, 640x480px
How can I fix the styling on this text area text? It's two rows but it's putting the text in a shitty spot.
>>
>>58518727
i can't see it clear enough try turning flash on
>>
Is it bad to have only the important static content (headers, menus, navigation, footers etc) load like normal when a user visits the site, and then have the actual content (whatever it may be) be entirely loaded in via ajax? I build all my sites pretty much "refresh-less", so all the main content (html) is generated backend then put on the page after an ajax call.

So much easier to develop and also better user experience, but is it the "wrong" way of doing things?
>>
>>58518727

add padding
>>
>>58518886
To what?
>>58518840
GIMP kills this netbook.
>>
>>58518975
>what is scrot
>>
>>58519048
Now I know.

Boss cant see me on 4chins though.
>>
whats the point in php forms? cant i just make a function that grabs data and stores in variables then do something with that?
>>
>>58519647
I'm watching laracasts right now and he just said he doesn't bother with them.
>>
>>58519647

if youre working with unchangeable data, yeah thats fine. However if youre reading from input field in a form and the user changes or enters new data, then you'll need to grab that using POST or GET with the name attribute in your input element. Not sure if there's another way to get that data without using a form....
>>
Making a danbooru-like page.

Python+Django or node.js ?
>>
Does anyone know any nice examples of 1 page web app designs.

I have the functionality of mine down, but it looks like dogshit and I need some inspo.
>>
>>58490305
College always seems to be 5-10 yrs behind
>>
>>58493348
I use it, just started. (Been away six years. Dropped out of webdev program at community college. Learned some Wordpress, gimp, and inkscape outside of school.)
FreeCodeCamp seems okay, although I'm just starting. I've dropped back into school, and I thought they would compliment each other.
Like anything else, hard work and the right attitude are key.
>>
>>58498161
You can take a break, Pajeet. Just don't shit in the parking lot.

Really, congrats on your job. And take lunch or go smoke a cigarette if you want. This isn't a pick/pack full of spades and other trash. Don't abuse it and no one will say fuck all.

Six months is cool, but look for work now. Just make sure to give two weeks.
>>
>>58482814
>web
>development
>>
>>58506966
You make an http request and parse the HTML reponse. A web server isn't just going to do it for you the easy way but some web services are just apis that output JSON. You will need to be able to inspect HTTP requests and responses unless you knows exactly what youre doing because you made the site.
>>
>>58498627
hes probably not a citizen
>>
>lost my first job in three months
>five months later and still can't get work

is it time to end it and alleviate the burden I place on my parents?
>>
>>58520977

this

i doubt any college is teaching node. Probably some old M$ asp.net shit still
>>
>>58522009
I had a class that was php/asp.net last year :(
>>
>>58515133
I hope you're using GSAP anon
>>
File: S 2017-01-17 at 03.01.42.png (172KB, 312x301px) Image search: [Google]
S 2017-01-17 at 03.01.42.png
172KB, 312x301px
Should I learn Webpack? Gulp is just too comfy. Also, how do you guys structure your javascript code?
>>
File: 1478057607838.jpg (556KB, 1600x1200px) Image search: [Google]
1478057607838.jpg
556KB, 1600x1200px
So I suppose that for web is html/css then javascript right?

so what's next?

also i'm doing codecamp but there is some site there with more Js exercises?

Any book I should read?
>>
>>58523159
see
>>58514481
>>
I need a resource on SQL/PHP security.

I'm building a little messaging web app and have no idea about security whatsoever. Halp
>>
Today was my first day of practicing for 8 hours a day. I already knew HTML and basic CSS so I started with JS.
I read someone was able to get a web dev job in 6 months on 2 hours a day so I'm gonna try to get one in a month on at least 8 hours a day.
>>
>>58523745

make sure youre using POST and/or GET properly, make sure SQL injection isn't possible through your inputs, etc. The best way to test for security is to try to fuck with it yourself or get other people to do it. Before you release it of course. All development locally should be you vigorously testing it to death before you launch.
>>
I wanna make a data service middleware for a school project. I also want to make it asynchronous, so I can plug it into anything.

Anybody know of an asynchronous back end framework for receiving HTTP requests and sending responses?

I don't particularly care what language it's for.
>>
is 960 grid system a meme?

It's the only "web language" i have experience with. Should I learn something that is more widely used or will the above mentioned thing work on major web browsers for a long time?

http://960.gs
>>
File: pdoquestion.jpg (84KB, 1207x584px) Image search: [Google]
pdoquestion.jpg
84KB, 1207x584px
learning php/pdo and trying to echo the ID of the user for a simple log in page that I'm making but despite my best efforts I'm not getting anything echoed or var_dumped to the screen after I type in the corret username and password.

If anyone knows where I'm screwing up in this code and can point it out would gladly appreciate it.

>inb4 lolphp
>>
>>58525868
//edit ... removed the PDO::FETCH_ASSOC, still not working
>>
>>58525868
I think it should be fetchAll not fetch.

Leave the fetch_assoc, it's fine.
>>
I need to extend my portfolio and need some tips for a few assigment or easy websites such as online calculators and blogs made from scratch.
>>
>>58525986
Fortune cookie website.
>>
File: emptyarray.jpg (2KB, 108x33px) Image search: [Google]
emptyarray.jpg
2KB, 108x33px
>>58525984
by removing the loop and replacing it with var_dump($user) I get pic related. Funny because if I type the same query in phpmyadmin it returns the ID so no clue why it's returning an empty array desu.
>>
>>58525984
and still doesn't work with fetchAll, tried that already :(
>>
>>58525868
>>58525946
>>58525984
fetch is fine
PDO::FETCH_ASSOC is also fine

>>58526003
try doing
"SELECT id FROM users WHERE username = 'myusername' AND password = 'mypassword'"
PDO is kinda weird when it comes to placeholders sometimes
try that, if it works, you need to play around with placeholders.
>>
>>58526017
and uh, if that works
try using the :name notation
"[...] username = :username AND password = :pass"
$statement->assign(":username", $username);
$statement->assign(":pass", $password);
etc.
>>
>>58526014
Alright, try getting rid of the question mark stuff.

$statement = $pdo->prepare("SELECT id FROM users WHERE username = :username AND password = :password");
$statement->execute(['username' => $username, 'password' => $password_hash]);


Check my syntax because I can't see in this tiny reply box.
>>
Is it possible to create express middleware that will serve files from a specific directory but will send randomized file names on the headers while serving the actual file?

For example I may want to serve the file on the server side:
/public/music/song1.mp3

and have it translate to:
/music/{randomized string}.mp3
>>
>>58526017
>>58526025
>>58526030
will do, haven't tried the :username and :password placeholders. going to do that now. thanks in advanced
>>
>>58525995
Thanks :)
>>
>>58526050
here's the doc with usage example on this
http://php.net/manual/en/pdostatement.bindparam.php
it's bindParam
assign is in smarty, derp
>>
>>58526069
still getting same result, going to hard code them now. ffs :/
>>
>>58526079
Post your PDO declaration.

That should have worked.
>>
>>58526079
weird
I remember having problems with ? as placeholders
but :placeholder worked fine
aaaaare you getting any sql errors?
you need to display them

do
print_r($pdo->errorInfo());
>>
>>58526091
>I remember having problems with ? as placeholders
>but :placeholder worked fine
Same thing here.
>>
>>58526099
dude it was so fucking infuriating
I was working on a super huge project at the time
it was a pain to realize that
so I've just never used ? again
but then I mostly code on existing frameworks with sql wrappers already so
>>
File: pdoerror.jpg (24KB, 1503x255px) Image search: [Google]
pdoerror.jpg
24KB, 1503x255px
>>58526099
getting this from the $pdo->errorInfo(). The weird thing is even after hard coding the username and the hashed password I'm still not getting anything back.
>>
File: pdo.jpg (17KB, 799x204px) Image search: [Google]
pdo.jpg
17KB, 799x204px
>>58526085
>>
>>58526125
well it says "no errors"
weird
can you just post the whole code for the pdo thing here?
is pdo connected correctly to the database?

>>58526136
well it doesn't look too wrong... weird
maybe try executing "SET NAMES utf8"?
$pdo = new PDO(
'mysql:host=mysql.example.com;dbname=example_db',
"username",
"password",
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
>>
>>58526111
Luckily I was just working on nothing important. I started digging through the PHP ini thinking I screwed something up there because I followed a PDO tutorial word for word.


>>58526136
huh...so did it work without prepared statements using PDO?
>>
I have people asking me to design their sites so, can I get away with freelancing website designs in bootstrap for now? I'm broke but know a fair amount of html and css (learning javascript soon)
>>
>>58526177
you really don't need much to create simple sites.
>>
>>58526150
that's pretty much the whole code. also tried added the part where you set utf8. Also it's connected correctly to the database, already tested that so honestly haven't a clue why it's not working but then again I'm new to php and pdo, can't wait to get into Laravel so won't have to fuck with this stuff again though :(
>>
>>58526217
>Laravel
hahahaha
that's probably the most broken piece of shit I've seen in my career so far

>move server
>suddenly doesn't work
>no problems visible
>enable debug
>"class not declared"
>file is loaded
>class is not
>dependancy chain is broken somewhere along the line
g-great fremwork guiz
>>
>>58526239
can't be worse than vanilla php though
>>
>>58526198
true, I suppose but I want to make sure I do this right. I know the next step after front end is back end development so I was wondering if anyone here makes any sort of decent income on designing websites alone?
>>
>>58526253
vanilla php doesn't just fatal error from moving it to a different server "because it feels like it"
fuck, I work with e-commerce and shit, and this is literally the first time any framework shit the bed like that
so yeah, laravel is the lowest on my list
>>
>>58526264
lower than symfony? :^)

>>58526217
Did it work without the shit?

$statement = $pdo->prepare("SELECT id FROM users WHERE username = $username AND password = $password_hash");
$statement->execute();
>>
>>58526335
I don't think I've worked with symphony
I did work with Zend tho
that was rather bad
but usable

the huge thing I wrote was on codeigniter, which was rather pleasant to work with, but it created ugly urls, which bothered me really bad.
>>
>>58486252
No. Looking at images requires JavaScript.
>>
How would you guys go about creating a simple quiz using only Javascript, HTML and CSS?

I managed to create a working, 3 question quiz with multiple choice answers, but had to jump through all sorts of hoops and it took me most of the day today. I had to create if statements that took into account every possible answer combination.

It works the way I want it to, seemingly without any bugs but I'd imagine something like this wouldn't be very practical if I needed to create a quiz with 10 or more questions...

If you were going to create a quiz that:
Had 3 questions, and 4 choices from which the user can only chose one, and then once all the choices were made and submitted, they're checked to see if they are correct. If they are, a paragraph element appears with text inside telling the user that he won, or that he lost in case he got them all, or some wrong. In the event that the user clicks the submit button without answering all the questions, an alert pops up telling him that all questions must be answered.
>>
>>58526596
create a js array with answers/questions

for example

var questions = [
["The answer to this question is A", [
["This is answer A", 1],
["This is answer B", 0],
["This is answer C". 0],
["This is answer D", 0] ],
["next question...", [ ... ]]
]]
]


etc.
then display it with some static view + change text depending on what's in the array
save user choices to another array
check if all questions were answered
so on
it's rather simple.
>>
>>58526628
kinda screwed up with the syntax there, but you should get the point
>>
File: fml.jpg (17KB, 906x168px) Image search: [Google]
fml.jpg
17KB, 906x168px
>>58526335
the problem was in the fact that I was missing 'dbname =', prior to typing the name of the DB amongst the parameters...hence I wasn't even connected to the db. Thank you and everyone who helped, at least I learned a lot about PDO having read a few tutorials and applying what you guys have advised me.
>>
>>58526824
oh lawd
np buddy
>>
>>58526039

bumping for answer to this. Because I think this is possible with htaccess butt ...
>>
>>58527521
Just learn everything yourself and go to coding meetups.
>>
Are coding bootcamps good for getting a job in web dev? Supposedly the more reputable ones in my city are pretty good for this. Even if the actual teachers are shit, I can just learn on my own (already doing edx and codeacademy etc.)
>>
>>58527569
see
>>58527543

They are expensive and if you can teach yourself (you will have to use more then code academy) just make stuff and you can get a job no problem.

There are also some services (launchcode) which do the "getting a job" part without you actually paying for classes.

Ones in your city might have some connections with employers but nothing you can't do just by teaching yourself.

It's a matter of how much you trust your own self-discipline and motivation. Networking can just be done at meetups, but even that is unnecessary.
>>
>>58525201
apache camel is an integration framework, you can plug anything in including other applications on same jvm, filesystem, http requests or anything you can think of rly
>>
>>58526177
You probably want to use a cms so these people can update their content by themselves thanks to free backend.
Also this way you can get away with minimal effort by editing already existing theme
>>
>>58526824
lolphp
>>
Working on my own version of jQuery called jQuery lite, how does this look:

function $(query){
return document.querySelectorAll(query);
}
>>
>>58482814
Java is only as good as the stack.

Modern Java with Java 8, Lombok, a new version of Spring, HikariCP, etc. is pretty good.

If you also have a modern IDE (Netbeans, Eclipse, IntelliJ), a decent build setup (Jenkins + Maven), and so on, it starts to get rather comfy.

But Java is more like FLOSS in general. You get something to build a good environment out of. You have to make some choices.

Also, Java 6 and earlier are painful languages to use.

>>58498936
The RAM usage from your code?
It's not all that much. An empty object is 64 bits.
The RAM usage from the JVM?
It's due to how the JVM loads up a whole bunch of shit you don't need. However, Java 9 will let your JVM only load the bits it needs to run your program, so the problem is being solved when Java 9 ships.

It's not that bad, IOW. What really sucks about Java is how shit the online newbie friendly documentation is. Every time I look up something and I find a YouTube video describing it, I know I'm going to cringe.
>>
>>58524882
Knock up your girlfriend, you get a baby in nine months. Knock up nine girlfriends, you can't get a baby in one month.

>>58523745
Someone linked this a while back, it's got some good info: https://www.owasp.org/index.php/PHP_Security_Cheat_Sheet
And in general:
- NEVER trust the user. If you're using use-submitted data in any way, ALWAYS assume it's hostile and sanitize it.
- When interacting with SQL databases, always use PDO. mysql_real_actual_guys_seriously_this_time_escape_string() is insecure and obsolete. If any tutorials or guides tell you to use it, they're extremely outdated.
- Store your PHP code somewhere not accessible to the user when possible. Either put it above your web root or configure the web server not to serve it.
- If you accept user-submitted files, DEFINITELY put them outside the web root and make sure they're not executable by the web server. Otherwise I could just upload a php file that does whatever I want and execute it by going to it in a browser. Then I own your entire server.
>>
>>58498794
In the Bergen area, you'd need about 2k to make a smooth transition.

If you can scrounge up enough for 1 month of frugal living (£600 is plenty), and £1400 is for rent deposits.

Expect to live in a shoddy apartment with others for the first few months. Then you can afford something better.

In Bergen, Laksevåg, Gyldenpris, and Danmarksplass are the cheap yet decent places to live. Don't try to pronounce them though.
>>
>>58525201
Node? Not memeing, it's legit good at event-driven asynchronous code, and there are modules to anything.
>>
>>58525201
Node dude, it will do this in 10 lines of code while others will do it in 100
>>
>>58512963
That's not a good solution, since it works for English subsets of latin only.

A better one is
/\w\w/ or of course, \w{2}

He may not need this functionality now, but some time in the future he's going to work with international customers, and they might actually need to write their name as Bård Börkbörkson. So you might as well get into the habit of writing portable code immediately.
Also, isn't A-Za-z dependent on collation order?
>>
>>58514365
You need to know HTML, CSS and JavaScript for the front-end.

For the back-end, you have a lot of options. Java, Python, JS through nodeJS, Ruby and others are all decent candidate.

You'll also need to know storage technologies, like SQL (mandatory) and potentially noSQL databases. noSQL are very popular because you don't need to know what you're doing to do things with them.
>>
>>58516040
If the server serves that static file, then yes, you can download it.
>>
>>58529239
>backend
>not mentioning php
PHP is like 80% of the internet
>>
>>58529074
Memesters were shitting on Java so it was time for some appreciation.
A lot of tutorials are outdated but there are plenty of good ones, including those from spring. I never watch video guides tho.
>>
Is a CI system the central point or foundation of a good development system/process? It seems to me like it is because once you have this working right you can get with the task of actual coding. But it seems like a bitch to set up right.
>>
>>58529426
Yes, but it's not a decent candidate.

>>58529484
I'd rather say that the current state of Java is optimised for the experienced developer, and not for the beginner. This is a good and a bad thing.

I mean, Hibernate and Spring are both widely used, but get a budding developer still in university to do anything to such a codebase and notice how much STUFF they have to learn first.

>>58529511
It's a natural outgrowth of a good process that has matured somewhat. You don't start by setting it up. You set it up once you start seeing the need for it.

When you're at the exploratory early days, you might not need it, just write good tests and have proper code reviews. But later when you're at 1.0 or thereabouts and your codebase is starting to get a bit big, the whole thing makes a whole lot of sense.
>>
>>58530063
>I'd rather say that the current state of Java is optimised for the experienced developer, and not for the beginner.

I guess you're right, i did jsp at school and learnt most of the good stuff doing internships.
>>
>>58530063
Yes thats what many people say but it seems to me like it should become more of a requirement for any serious project rather than a nice to have. I have worked for many huge companies where they don't have a fucking clue about CI, I think because we treat it as optional.
I don't really care if some faggot company wants to do shit the slow way but I would want to know if I am not doing things the smart way.
>>
>>58530331
Setting up Jenkins can be a bit of a pain, but you only need to do it once. So I agree that any serious project needs CI.

It's not even that complicated to use it. The pain is setting it up, and/or making the build process compatible. (You have to have some control over how you use git for example.)
>>
How to make Vuejs add in a list more than one form when pressing a button? I can do it just with one form, i want to write and use form selection and press a button to add it in a list. Thanks.
>>
node is powerful but freaking confusing. It does nothing out of the box you have to set everything up yourself. Shit's cash though
>>
File: 1477922397328.png (325KB, 480x716px) Image search: [Google]
1477922397328.png
325KB, 480x716px
So I came across PGSQL's row-level security feature and it seems to solve a lot of common problems in authorization.

Is there any similar feature in other databases such as MySQL or MongoDB?

Otherwise, in-application solutions?
>>
>>58515133
>JavaScript since a lot of techies disable that.

wat. y?
>>
>>58532316
By "techies" anon probably means paranoid /g/entoomen, not actual tech professionals.
>>
>write a PHP script that reads through a directory of thousands of image
>script needs to be called frequently for this application im building
>server stalls for 5-6 seconds every I call the script

i've officially joined the PHP meme club. I'm re-writing this shit in JS/AJAX. I still like PHP though.
>>
>>58532903
Sounds like poor programming to me.

In what case would you need to do an action that intense on a regular basis?
>>
>>58532903
Yeah that's definitely the solution. Rewrite everything instead of just implementing some form of caching.
>>
>>58533017

i have thousands of product images. Each has an item number. Some items have multiple pictures. I want to display all the images for each item number. User can search an item number which will bring up that item and all its pictures and details. Each time the user pulls up a different item i call the script. What else could i do?
>>
>>58533086
save image path in db so that when you query item you get related images and you don't have to browse though all image files ?
>>
>>58533086
Sort the pictures like
/images/<itemID>/<pictureID>.png
Then google "how serve static content PHP"
And apply the instructions to the images directory.
>>
>>58533108

thats what im doing now BUT it only shows the first image. If an item has multiple images which most of them do, i'll need multiple paths. And I don't think it's reasonable to have a bunch of fields for each image path.

>>58533130

i dont think i need to sort the images. The item number is in the path so i just read through the folder and say if first 5 characters equal the actual item number, then display the image. I *think* what i need is just an ajax call. I can still use the php, but I'm going to try and read through the directory, store the data in JSON, then use an AJAX call to display the images
>>
>>58531445
Please, someone help me.
>>
Anyone here have experience with c based web frameworks?

Is it worth the trouble or would I be better off using a more popular language framework? (django, asp.net, spring, etc)
>>
>>58531461
Node is powerful when you're dicking around with it to learn. Move it to production, and you'll realize it's shit.
>>
>>58533287
Save all the paths in one column separated by a comma, then when you pull it from the db explode the comma and while through.
>>
>>58533453

whys that? if its works in development why is it shit in production?
>>
>>58532316
Privacy and shit

>>58532414
I mean why should I implemented it in JS if I can implement it in pure CSS? JS will be twice as slow and I will need a 100kb library that costs €100 per year for commercial use and another 200 lines of my own JS... before I delve into this mess I serve a gif instead. And then how am I supposed to know that fucking IE/Edge decides to ignore transform - literally the most used property in animations.
>>
What can I do about a young hotshot at work that barely knows the difference between a backend and a frontend but wants us to start using all the fresh new frameworks and libraries around just because?
>>
How can I get a job as a backend web dev? The only jobs I ever see are for front end.

I refuse to learn ""responsive"" design and all the meme styling frameworks.
>>
>>58533708
Tell him that you tried those frameworks/libraries and you don't think they're good enough/popular enough to make the switch.
>>
File: ss (2017-01-17 at 21.53.33).png (16KB, 935x272px) Image search: [Google]
ss (2017-01-17 at 21.53.33).png
16KB, 935x272px
How does callback work and how does it help keeping other JS running in the background?
>>
>>58488296
use amazon SES+verification for medium traffic,
for testing use smtp+gmail, google it because you need to disable some stuff in gmail
>>
Java or .NET?
>>
>>58533874
callback should be called at the end of your download to do whatever you want to do
in the meantime your program will do all the other stuff it's supposed to do and not just wait around like a retard that you finish downloading
>>
>>58533955
java with tools described by anon >>58529074
>>
>>58533495
>single threaded
>>
>>58533959
thank
>>
>>58533468

i went with this option, worked perfectly. thank you based anon.

old shit code:

foreach ($files as $x)
{
$itemNumInPath = substr($x, 0, 5);
if ($itemNum == $itemNumInPath)
{
echo "<img src='" . $folder . "/" . $x . "' />";
}
}


new improved code:

$imagePathArray = explode("+", $imagePath);
foreach ($imagePathArray as $x)
{
if (!empty($x))
{
echo "<img src='$imageDir" . "$x' />";
}
}
>>
File: 1483821954093.jpg (72KB, 520x853px) Image search: [Google]
1483821954093.jpg
72KB, 520x853px
>>58502996
ay pajeet
>>
>>58509137
$ man chown
>>
>>58509562
>Where can I practice writing JS code
browser console
>>
>>58534039

for web apps do you really need more than 1 thread?
>>
>>58534672
>le pajeet maymay
>le no argument whatsoever
>>
File: 2c78b91.jpg (1MB, 1825x939px) Image search: [Google]
2c78b91.jpg
1MB, 1825x939px
pretty right?
>>
Does anyone else find that hackerrank questions are consistently so broken that even correct answers fail, and that those breaks always occur on the questions whose outputs are hidden
>>
>>58535205

sites aren't actually this insecure where you can run this on them, right?
>>
>>58535394
Not sure what you mean, but this week alone there's been like 4 major breaches that I can remember. Publicly available dumps are usually posted here.

https://publicdb.host/search.php
>>
>>58534762
Yes, unless you're planning on having less than like 10 concurrent users (i.e., dicking around with it).
>>
>>58535531

i thought the whole point of node was so multiple users can do stuff asynchronously.....?
>>
>>58535548
no, thats why people use PHP
>>
>>58535554

no it cant be. All this jizzing over node the past few years and youre telling me multiple people cant use a node app at the same time? it just cant be

nooooooooooooo
>>
>>58534300
Glad it worked well.

It's useful in many situations.
>>
After discussing with the team, we've made the decision to not move forward at this time. I hope you don't mind if we reach out to you in the future when a position opens up that may be a good fit.
>>
>>58533684
You're not wrong, you just said a dumb thing that some people find mildly funny. If you can do an animation in CSS, that's generally better than JS since it can run on GPU. It's ridiculous to avoid using JS on your site because "techies disable it" unless you're running a hidden service and don't want the alphabets onymizing you or something. If someone has JS disabled, slap a noscript warning up to complain at them and don't worry about it. They're probably already used to it.

> I will need a 100kb library that costs €100 per year
That's ridiculous though, you can almost certainly do it in vanilla-js or jquery for free.

> And then how am I supposed to know that fucking IE/Edge decides to ignore transform
If you're a semi-competent web developer, you should know what certain browsers can and can't do or at least know how to look it up (caniuse.com is good). If the animations are required for core functionality of the site, bitch at them to get chrome or ff and get on with your day. IE/Edge has a very small market share, and it's even lower among "techies"
>>
>>58535740
I hate you for reminding me of that phrase, of how many times I've been told it over and over again.

Today I failed a coding test becuase they insisted on using that same fucking coding environment that always breaks for me. I can't get a job because HackerRank hates me.

I'm not a bad programmer. I'm not even an okay one, but this one fucking environment never fucking works and every time an application uses it I die a little bit more because of its bullshit
>>
>>58535867

I'm 100% sure they denied me because I'm a boring person.

I was having a phone call with the developers, so I studied up on principles and components with the language of choice. I read their open-source projects and learned how they worked. I pumped out a few new projects to say I keep making stuff.

Then I got on the interview.

So, what kind of hobbies do you have? What kinds of things do you like to do? Normie interview questions. I was throw off so hard I sounded like a total autist with no hobbies or friends (:^))
>>
>>58533748
>How can I get a job as a backend web dev? The only jobs I ever see are for front end.
Look harder or move? Frontend is more common, but they're out there.

>I refuse to learn ""responsive"" design and all the meme styling frameworks.
If you refuse to learn about new technology practices, you should probably get a job outside the technology industry.
>>
>>58535867
I love getting senior-level hackerrank questions.

"Create a AAA game with either PHP or Javascript. It must have 1500 lines of voice-acting and a 13 hour campaign. You have 30 minutes. Time started 15 minutes ago."
>>
>>58535548

Truly the biggest moron to every post on /wdg/. Ever heard of upgrading your server to handle large scaling? Idiot.
>>
>>58536502

Fuck, meant to quote >>58535531
>>
http://embed.plnkr.co/aax7vC/
How to make it load 2 data form?
>>
>>58536725

that url looks scary i dont wanna go to it
>>
>>58537072
It's from Plunker website. Just like codepen, jsfiddle...
>>
>>58482814
>>9905524 (OP)
http://www.mediafire.com/?612qyceubs7ua0o
>>
>>58533684
>Privacy and shit

No one actually cares what you beat your dick to.
>>
/g/, you told me node.js is the best.

But there's litereally ZERO good REST frameworks for it. How the fuck do I generate enterprise grade, fully RESTful CRUD applications without that?

You are forcing me to repeat tons of code, and you're making me do it in FUCKING JAVASCRIPT

Python has Django REST Framework. Absolutely beautiful definition of URLS, and lets you build viewsets which represent all the crud operations of a resource.

Plus it sucks your dick.

You tricked me, /g/

it doesn't even have good database support
>>
>>58536725
fuck trying to figure out out to export as new plunkr or whatever
add this to js
app = new Vue({
el: "#main",
data: {
users: fetchArray("users"),
faggets: fetchArray("faggets")
},

ready: function(){
this.$watch("users", function(value){
saveArray("users", value);
});
this.$watch("faggets", function(value){
saveArray("faggets", value);
});
},

methods: {
addUser: function(name){
this.users.push(name);
this.user = "";
},
removeUser: function(index){
this.users.$remove(index);
},
addFagget: function(name){
this.faggets.push(name);
this.fagget = "";
},
removeFagget: function(index){
this.faggets.$remove(index);
}
}});
>>
>>58537818
>>58537818
add this in html in main div after user list
 <h1>Fagget</h1>
<input type="text" v-model="fagget">
<button v-on="click: addFagget(fagget)" v-attr="disabled: fagget ===''">Add</button>
<p v-if="faggets.length > 0">Click to remove</p>
<ul>
<li v-repeat="f : faggets" v-on="click: removeFagget($index)">{{f}}</li>
</ul>


Also i don't even know your meme framework
Thread posts: 323
Thread images: 22


[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.