[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

/wdg/ - Web Development General


Thread replies: 255
Thread images: 30

File: 1456449140972.png (868KB, 822x552px) Image search: [Google] [Yandex] [Bing]
1456449140972.png
868KB, 822x552px
OLD THREAD >>54247122
> Discord
https://discord.gg/0qLTzz5potDFXfdT

>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/
http://www.freecodecamp.com/
http://www.codewars.com/
>Crockford on Javascript
https://www.youtube.com/playlist?list=PL7664379246A246CB

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

>Backend development
https://en.wikipedia.org/wiki/Comparison_of_web_application_frameworks

>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://www.youtube.com/watch?v=pB0WvcxTbCA
Good videos on the channel too
https://www.youtube.com/channel/UCVTlvUkGslCV_h-nSAId8Sw

>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
>>
File: 1416852085957.png (193KB, 637x517px) Image search: [Google] [Yandex] [Bing]
1416852085957.png
193KB, 637x517px
first for we're all gonna make it
>>
So I have 3 computers (all wangblows), 1 doesn't have any admin rights and I have access to a VPS. How can I sync my environment across these 3? I know about Vagrant but I am not sure how I will use it in this case and connect it to an IDE.
>>
Hey team,

I'm trying to make my site mobile friendly. Because of the high resolution on the small screen, I just made all the font sizes bigger and that worked except all the ads look tiny now. How can I make it work properly?
>>
>>54302901
Dont make the fonts bigger.

Do use http://www.w3schools.com/css/css_rwd_viewport.asp
in the header.
>>
>>54302923
Nice. Why don't they teach me this shit at web development school
>>
>>54302966
Thank god I never went to webdev school then. :^)

You should just go to school for your degree. But the real learning is done working on your own projects and stumbling across solutions online.
>>
>>54302162
I'm afraid I can't. Especially since I'll have to get a job before summer ends or its suicide for me. Haven't even started learning javascript but maybe I'm underestimating myself with how much more HTML/CSS I need to learn. Putting yourself down is always hell when learning something new
>>
I have a bootstrap carousel at the top of my page and it is full width and not in a container so it goes to the edge of the page. This is what I want EXCEPT once the page gets too wide, what query do I need to do to make it act as if its in a container above a certain width?
>>
Suppose I have something running already on production - how do I scale?

One database? Replicated separate databases?

Multiple frontend servers?
>>
>tfw been lurking /wdg/ for almost a year while never being able to stay focused on sticking with it long enough to escape neetdom
if I'd just have kept at it this whole time, I would've already had a job by now.
>>
>>54305593
What's your bottleneck?

Find that and scale it.
>>
>>54305593
Caching is probably the easiest and it should get you pretty far.
>>
can someone clear up just this one detail about how to do server-side scripting on a website

the way it works is you have a php/python/java/C++ script/program ready to run on your website's server, and the script/program (which is on the server side and never downloaded by the user) contains the username and password (which must never get leaked) for the website's database, right?

and then how does the end-user (visiting the website through a web browser/mobile app/scraper type of thing) send and receive commands and data? is it through http requests or something?
>>
>>54306498
yes, you do a (most of the time) post request to the server which passes it on to whatever it's configured to.
>>
>>54306498
>user fills in a html form and presses send
>php, which the user cant see, retrieves the data from the form, filters it and then puts it into the database using your passwords
>>
I have 100 categories where I am displaying the top 10 entries in each category. Right now I am using a for loop in the django template to display everything. It is taking 20 seconds to display the page. I feel like looping through and printing is causing the delay. The db query takes 500 ms

I want to do the 100 loops at the same time.
Is this something I can use react for? Or am I better off trying to write my own ajax handler? Or what would be a better solution?
>>
I don't understand Slim 3...

I don't get how to use a Slim\Twig view when using that syntax:
>$app->get('/', 'controller:method');

Is it just me or Slim 2 was way easier? I thought I'd use Slim to work faster, now it's been two hours of no work.
>>
>>54307003
Alright, I finally got it. That DI is annoying, but at least I'm learning new stuff.
>>
has anyone had to do a whole lot with timezones in your apps? I want to keep my server at UTC, and then adjust each user's time by their timezone, but I'm trying to decide how to do it. It makes sense to me that the user should specify their timezone, but I can't remember ever having to do that in an app, and I don't want their location data. Any ideas?
>>
aren't there any (free or paid) resources for internationalization for common things like "username", "password", "email", "required", "reset password" in different languages without having to resort to using google translate or some dictionary
>>
>>54307148
javascript date object already does this for you.
>>
>>54307306
What exactly are you looking for? A JSON? A SQL table to read from with culture + word?
I'm not aware of any service or whatever, but sounds like a common problem.
>>
>>54307421
just any list of translations of common website/software user-facing words and phrases would do, i don't need it to be in a particular data format
>>
>>54307464
>>54307306
Steal it from other projects that are already localized. WordPress is probably already available in a million different languages so maybe start there
>>
>>54307528
ok thanks that does seem like the most reasonable option
>>
I still can't get my mailer to work.

Sendmail does nothing
postfix does nothing

nothing does anything

wat do
>>
>>54308313
check logs
>>
>>54308336
sendmail said my FQDN wasn't qualified.

I'm currently trying postfix again.
>>
>>54308388
did you set up your hostname correctly?
>>
>>54308408
Yep, with a .com

I'm looking through logs.

>unable to qualify my own domain name
>gethostbyaddr failed (even though it's the right IP)
>MTA-v4: Problem creating SMTP socket
>SYSERR(root): collect: Cannot write
>>
Hope this is fine for this thread...

So I have a start up with a good amount of money invested (not mine) but they wish to make an automated system for their check ins. This is for a clinic, so essentially the person comes into the clinic on that day, and gets checked in without ever having to go to the counter else than to maybe show ID.

The system I was thinking of was similar to how a lot of large stores/work out places or even just normal businesses have slide cards to check in. I wanted to integrate a system where people get their card upon a first visit, then upon coming back to can slide their card to update their information, aswell as a bar for a digital signature at some form of computer station. This would all just link out to the clinics site essentially or just it's records program so it can be updated.

My question is, looking at something like this, is it even a good idea for a clinic, about how many people would be needed for such a job, and since I'm pretty sure the technology already exist what are some companies that can be called to buy out this system to implement.
>>
>>54308523
I would just have a textbox that says "Type your last name"

It would pop up a list of people with that last name with an appointment scheduled for that day and they could click on it and then click 'check in'

Veteran Affairs has a system just like that, but touchscreen.
>>
>>54308523
some european countries have that, everything is stored on a card which has your information on it which can be read by medical facilities.
>>
can you suggest some good (preferably free) visitor tracking app? Awstats is kinda shitty and have to wait for day reset to see new data
>>
>>54308634
goaccess for log file analyzing, piwik for tracking
>>
>>54308634
>app
>>
What distro are you guys using? I've been using Mint so far but it's not as good as I thought it would be.
Any suggestions?
>>
File: unity.png (140KB, 558x535px) Image search: [Google] [Yandex] [Bing]
unity.png
140KB, 558x535px
just found out that my ISP hosts one year for free and then 3€/month

what should I do with my first website ?
>>
>>54308702
dragon dildo fan site
>>
>>54308677
Ubuntu. That way I can use the same OS on my laptop as on my server.

I'm sure CentOS is a better idea on a server and Windows on a PC. But I like to standardise things so I can test things easier.
>>
>>54308582

That actually doesn't sound too bad. Then if the person looses a card it's not a hassle either. Thanks for the tip. My only real issue with that system would be if someone has the same name or decides to click on someones elses. Could each person in the clinic be given a pin code or further the log in to update info through first putting in their DOB year. I want to make this system as simple as possible for clients, but still safe and fine.

For this I could possibly make my own system that runs for the clinic to use that incorporates all this and just sends off to the server/desk the info. I just don't know how difficult such a thing would be to create, if there's any good code to re-use, or even where to begin really.

Thanks for the suggestions again.
>>
>>54308732
Having two people with the same first and last name with an appointment on the same day in the same clinic would be a rarity, but it can be solved.

You can just put first middle and last name.

I would only add the middle name if there were two people with the same first/last on the same day in the same clinic. Doing it for every name wouldn't look as clean.

So

Mary Sue
Bob Robert
John Adam Doe
John Terrance Doe
Cathy May
>>
>>54305590
Have you tried giving it the CSS of:

max-width: 1000px;
>>
Why does Dreamweaver not like it when I do this:


$updateSQL = sprintf("UPDATE Users SET Red=%s, Green=%s, Blue=%s WHERE Identification=$_SESSION['MM_Identification'] ",
GetSQLValueString($_POST['Red'], "int"),
GetSQLValueString($_POST['Green'], "int"),
GetSQLValueString($_POST['Blue'], "int"));

>>
>>54308897
>dreamweaver
>>
>>54308897
Dreamweaver is still a thing? And people are using it for something other than static pages?
>>
>>54308929
>>54308940

I'm a webdesign pleb and I have to build a simple website. The form wizard things help me immensely.
>>
>>54308732
>I just don't know how difficult such a thing would be to create, if there's any good code to re-use, or even where to begin really.

It's not that difficult. You need 3 pages.
Have an admin system for Doctor's computers to set appointment. Add to DB. AJAX/PHP

Check in computer has what I already told you
select first name, last name from the database where the day, month and year = server day month and year.

When they click their name AJAX 'checkin' column to true where their name is.

Receptionist's computer constantly queries the DB for new checkins and displays on the computer.

I would put a slightly different version of that on the doctor's computer so they can click a name they are ready to have sent back, then the receptionist will see it and can call them up.
>>
>>54308828
At my local farmacy they always ask for your birthday and then names of people who have an order that day get shown.
>>
>>54308897
>>54308966
https://en.wikipedia.org/wiki/SQL_injection
>>
Who knew learning html can be so fun and addicting?
>>
>>54309177
Oh god I didn't even notice he was using sprintf. I just assumed it was something else
>>
>>54309177
Nice post.
Not.

I know that it's shit, and I told you that I'm a pleb. And yes I know that the default generated shit from Dreamweaver is full of holes.

Something more useful would be:
Can I just replace the sprintf with something else?
Can I just slap real escape around one of these bad boys: GetSQLValueString($_POST['Red2'], "int") ?
>>
>>54309626
And I just remembered that the code has this, so am I safe?
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}

>>
>>54309626
read the mitigation part and use phps pdo.
https://en.wikipedia.org/wiki/Prepared_statement#PHP_PDO
https://secure.php.net/manual/en/pdo.prepared-statements.php
>>
>>54308523
Pretty easy to build. I'm sure that any half decent dev can build your kinda quickly. You only need a server where to have your user management stuff on, some kind of PC at the entrance of your building that reads the RFID card into a form and then submits it to your management system. Not to sure what exactly you want to do, but tracking working times and stuff is easily built.
>>
>>54309722
Its 2016. Use PDO
>>
What's so great about Angular? Lots of employers seem enthusiastic about people who know it. I've tried studying it but still never implement it into my projects. What's the point?
>>
Short question. Any drawback on using $_SERVER["HTTP_REFERER"] as a redirect destination in case of user error?

Example:
User creates another user and uses an empty string as name. That causes my page to throw a userException which contains the error message for the user. He gets redirected to where he was and gets the message displayed.
>>
>>54310303
It's a tool for the tool box. It's a pretty good general purpose frontend framework that can do a lot of things.

Mostly, it's popular because there are a lot of developers that know how to use it, and the reason there are a lot of developers that know how to use it is because it's popular.

Some meme.js framework might be better at a particular task, but angular is a workhorse that's been around forever (as far as frontend js frameworks go) and will probably be good enough at most things most of the time. Also it's sponsored by google. People like google.
>>
How big of a MEME is creating and selling Wordpress/Tumblr themes and shit ?

As I am seeing the crust of it, it seems like there is ~50 famous developers/companies that make the top 1% and the rest is almost luck or underpaid.

Is there someone that is in this niche to confirm this or tell me how exacly it is ?

All I want is to get into it for ~10-20 projects, sell few just to get it going and put it in my resume for a local company so I can have a normal job. Since I don't have any CS degree or any xp in the market
>>
>>54310782
I'm not in the business, but
> ~50 famous developers/companies that make the top 1% and the rest is almost luck or underpaid
sounds pretty accurate. It's hard to make money off things people put online for free. Especially since (I assume) you're not some kind of web design savant or something. You'd have better luck offering some kind of service like making sites and whatnot.
>>
>>54308897
>dreamweaver
>php
hi pajeet hows your freelancing job going
>>
File: 20Pkw.gif (399KB, 320x240px) Image search: [Google] [Yandex] [Bing]
20Pkw.gif
399KB, 320x240px
>Looking at jobs on indeed
>UI Developer - $100,000/yr
>REQUIRED: 7+ Years of experience with HTML5

>mfw html5 came out in 2014

Anybody got a time machine I can borrow?
>>
>>54310567

Some plugins turn it off.

You risk infinite loops if it takes them back to a page that throws the same error.

You risk them being redirected to an unexpected page that isn't designed to be displayed a second time.

Don't be lazy, catch your exceptions properly and make sure you send the user to a known safe page or the form they need to resubmit.

Can also be worthwhile coding a default exception page for unrecoverable errors.
>>
>>54311191
>he isn't from the future
You'll never make it in this industry
>>
>>54311191
lol just go to the interview and when they ask you for your exp tell them yeah, I invented time machine and add ;^)
>>
>>54309177

Assuming that function casts the values passed to it as what's specified in the second param, that's perfectly safe.
>>
File: Capture.png (29KB, 653x567px) Image search: [Google] [Yandex] [Bing]
Capture.png
29KB, 653x567px
>>54311191
Another one

>The candidate need to be experts in JavaScript libraries – D3,ReactJS, AngularJS.


>Excellent communication skills both written and verbal
>>
>>54311237
My mistake, I missed a detail: userExceptions are manually thrown, all other "harder" exceptions end at a 403, 404 or 500 page.

The pages with userExceptions are forms, so they are redirected to where they entered invalid data.
>>
Pretty dumb question, but how can I prevent text from after the form from sticking to the back of my form? I can't seem to remember.
>>
>>54311554
What
>>
File: 1446661836649.png (291KB, 600x512px) Image search: [Google] [Yandex] [Bing]
1446661836649.png
291KB, 600x512px
>>54311554
>>
File: pro drawing.png (7KB, 1152x648px) Image search: [Google] [Yandex] [Bing]
pro drawing.png
7KB, 1152x648px
>>54311662
>>54311647
>>
>>54311678
Put the form in a div or add display:block to it probably
>>
What's the easiest to use/learn front end JS web app toolkit?
>>
>>54311191
HR is a joke
>>
>>54311554

.myForm
{
display:block;
}

Alternatively, stick the text in a div

Also, you really shouldn't make forms inline...
>>
>>54311738
>>54311704
Tried all of it without result. It slid a bit up when I used display:block.

And I checked for floats.
>>
>>54311901
Put your code in codepen and post link here or something, can't really help you otherwise.
>>
I tried AngularJS, and particularly hated the way of including modules and how overcomplicated it seemed.

I briefly tried React and while seeming better than Angular it still feels painful

What else is there? is EmberJS any good? what about things that have some kind of UI/widgets integration?
>>
>>54311970
I'll post the relevant piece here.

<?php 
if((test if session is not busy)){

text and stuff

?>
<?php } else {
if ((something == 0)) {
?>
<p>You have no ID set!</p>
<form style="display:block" method="post" name="form1" action="<?php echo $idEditAction; ?>">
form textfields and labels and buttons
</form>

<?php } ?>

<p><a href="<?php echo $endSessionAction ?>">End session...</a></p>

<?php } ?>

<p>No session found -- <a href="../session.php">Start Session</a></p>



I tried to format it as good as I can.

>inb4 php, I'm prototyping something
>>
>>54312104

Those are all block elements, without CSS fucking shit up, they shouldn't displlay inline.

If you've no CSS behind it, I'm guessing there's a markup error.
>>
I bet I could hack everyone of your dumb websites without even trying
>>
>>54312104
PHP gets most of its hate because of code like this

Honestly, you'd probably have whatever you're prototyping done a lot faster if you used a Framework or at the very least conformed to some variant of MVC
>>
>>54312380
Well it's what I like in php.

I usually write background programs like scripts or command line stuff. I hate visual design.
>>
>>54312456
Its bad practice. VERY bad practice

And so do I by the way. Doesn't mean my web related projects need to be spaghetti monsters
>>
How dangerous is Appen in terms of keeping our privacy intact?
>>
>>54312104
This looks like a mess. It would have been so much neater if you did the HTML bits in echo, but code aesthetics really doesn't matter so w/e.
>>
Dear /wdg/ how does one exclude an IP from nginx? I have this snippet:

if ( $remote_addr = "my.ip" )
{
access_log off;
}

And I stuck this snippet into every location under /etc/nginx/sites-available/default my server and yet my IP is still getting recorded and consequently my logs are absurdly large and difficult to read.
>>
File: 04.30.2016 - 3.jpg (945KB, 1200x4252px) Image search: [Google] [Yandex] [Bing]
04.30.2016 - 3.jpg
945KB, 1200x4252px
How do I get my website to display on my Openshift domain?
>>
File: 1435027672988.png (67KB, 350x338px) Image search: [Google] [Yandex] [Bing]
1435027672988.png
67KB, 350x338px
how do you guys get the creative juices flowing? I'm doing my first actual website and I have no idea how it's going to look. I still have 3 weeks and there is no database programming, just an informal website for a farm produce store.
Thinking about smoking some weed, but I'm scared I'll be too lazy to do anything
>>
>>54315685
Learn from top gear

MOOD

ROOM
>>
As someone with no experience in web dev, would I be better off trying to get into this or getting a CS degree from a community college?
>>
>>54315865
Don't even bother. Unless Trump is elected, you'll be working at McDonald's (if you're lucky), while Pajeet will be working as the web dev (unpaid internship) with a master's degree from Poo in Loo TrirulNavi Abu Dabi IT Institute.
>>
Node question: Why is it that so far every tutorial I've seen only shows how to get data from the database and display it in the console?
>>
>>54315951
pls no
>>
What's the optimal Windows workflow for web dev?

(For all intents and purposes, frontend)
>>
Hello. I was wondering how /wdg/ keeps their image thumbs consistent when working with content management systems? I can think of a few ways myself, but I thought I'd look for advice on what the best practices are rather than just go for a shot in the dark.

Example would be any periodical site that has a lot of articles lined up, like so (under "More Top Stories"): http://www.theatlantic.com/
>>
>>54316006
What else is there. Once you have the data, do whatever with it. Do you want them to tell you how to return the data and call it via ajax or something.
>>
>>54316006
Return the data to view as json or something and pickup the slack from there.
>>
I have been working with JS trying to make a banner slide show thing.

I got it to where you click on the next button it slides to the next slide but, if you click while your in a transition it will brake my script. is there a way i can set a condition for the click event I have been using setTimeout() but i dont think this is that good of a function.

<script>
var top_slide = true;
function move_slide1(){
console.log("2b1");
$('#slide2').insertBefore('#slide1');
$('#slide2').removeClass('clicked');
$('#slide1').removeClass('clicked');
$("#slide1").toggleClass('clicked3');
$("#slide2").toggleClass("clicked3");

}
function move_slide2(){
console.log("1B2");
$('#slide1').insertBefore('#slide2');
$('#slide2').removeClass('clicked2');
$('#slide1').removeClass('clicked2');

}

$(document).ready(function() {
$('#next_slide').on('click',function(e){
if(top_slide == true){
$("#slide1").toggleClass('clicked');
$("#slide2").toggleClass("clicked");
window.setTimeout(move_slide1, 2000);
top_slide = false;
}
else{
$('#slide2').removeClass('clicked3');
$('#slide1').removeClass('clicked3');
$("#slide1").toggleClass('clicked2');
$("#slide2").toggleClass("clicked2");
window.setTimeout(move_slide2, 2000);
top_slide = true;
}
});
});
</script>


full code:
http://pastebin.com/dheB4Yij
>>
>>54316299
I had the same problem a while ago, but never found the answer.
I'm curious myself
>>
File: ob.png (895B, 109x38px) Image search: [Google] [Yandex] [Bing]
ob.png
895B, 109x38px
>>54316229
>Do you want them to tell you how to return the data and call it via ajax or something
Actually, yes. That or json. None of them mentioned how to get them into the views.

>>54316258
Okay, I've done something like that. Now to figure out how to use it in Express.

app.get("/blog",function(req,res){
var results = connection.query('SELECT * from blog');
for(var i=0; i < results.length; i++){
console.log(results[i].title);
}
res.render('blog', {
title: 'Contact',
blog_posts: results
});
});


In the view:
    <%=
blog_posts
%>


Result: pic related. That's all I see, the object.

idk what I'm dewin.
>>
How to disable view caching in laravel 5.2? This shit is fucking annoying. Why it doesn't have an option to disable it while in development
>>
>>54316299
These are CSS transitions presumably? You could use a flag and something like `transitionend` but browser support is bad. Really you'e better off using a plain old JS animation. Try something like:

            $(document).ready(function() {
var animating = false;
$('#next_slide').on('click',function(e){
if (animating === true) return;
animating = true;

if(top_slide == true){
$("#slide1").animate({...}, 2000, function() {
animating = false;
move_slide1();
});
$("#slide2").animate({...}, 2000);
top_slide = false;
}
...

});
});
>>
Is codeacademy pro worth it?
>>
>>54317937
No, and codeacademy in general isn't either/
>>
>>54317937
IMO, only if you REALLY enjoy their learning method and want to practice more with their "quizzes".
>>
>>54317922
Ah OK i m going to give this a try when I get back home
>>
Jimmy Birer if youre in this thread then respond to my messages you stupid idiot
>>
>>54312101
Give VueJS a look.
>>
>>54312101
There's also Backbone and aurelia
>>
Hi people. I've made a few webapps:

http://alissa.ninja/scrum.php
http://stochatta.com
http://stochatta.com/paint.html

But do very little "front end" work (I rarely design a personal website or anything like that). I want to get work as a web dev. How do I do it?
>>
>>54319059
>http://stochatta.com

Loading...
4ever
>>
Why won't PHP let me use my functions from an included file? This is the error I get on my page:

Notice: Undefined variable: valid_username in...


Why does it think it's a variable?
>>
>>54320453
post the function and how you're calling it.
>>
>>54320480
Ignore the really shitty code for now.

<?php

//username
function valid_username($input)
{
$taken_v = true;
$blank_v = true;
$letter_v = true;
if($row['Username']!=$input)
{
echo "Username is taken.";
$taken_v = false;
}

if($input="")
{
echo "Username is blank.";
$taken_v = false;
}
if(!(preg_match('/[a-zA-Z]/', $input)))
{
echo "Username needs at least one letter.";
$taken_v = false;
}


if ($taken_v && $blank_v && $letter_v)
{
return true;
}
else
{
return false;
}

}

//Password
function valid_password($input)
{
$length_v = true;
$space_v = true;
$match_v = true;

if (!(strlen($input) <= 8))
{
echo "Password has to be at least 8 characters.";
$length_v = false;
}

if (preg_match("/\\s/", $input))
{
echo "Password can contain no spaces.";
$space_v = false;
}

if(!($password == $passwordTwo))
{
echo "Passwords do not match.";
$match_v = false;
}

if ($length_v && $space_v && $match_v)
{
return true;
}
else
{
return false;
}

}

?>


And then I'm calling the functions here, in another file. The file that the functions are in have been included properly.

if($valid_username($user) == true && $valid_password($password) == true)
{
$sql = "INSERT INTO users (Username, Password, Name, DOB, Email, Access)
VALUES ('$user', '$password', '$name', '$dob', '$email', '1')";

if ($conn->query($sql) === TRUE) {
echo "she's all fuckin done, cobber";
}
else {
echo "Error: " . $sql . "<br>" . $conn->error;
}
}
>>
>>54320556
>$valid_username
>$

think about it.
>>
Making a blog lads
>>
>>54320556
besides
>if($input="")
will always return true, use == to compare.
and don't put variables into sql queries, you'll fuck yourself with that. look up PDO.

I'm ignoring the rest for your sake.
>>
>>54320578
Wow, I'm a fucking retard. Cheers.

>>54320594
Whoops, good eye. Thanks.
>>
>>54320556
>$row['Username']
wut

>$input=""
wut

>$taken_v
wut

>$passwordTwo
wut

>$valid_password
wut

>('$user', '$password', '$name', '$dob', '$email', '1')
wut
>>
>>54320581
what kind of blog.. I just dont know what I should do
>>
>>54320631
Most of those are example of thinks that work, but aren't good. If your 'wut' is to poor standards of coding rather than incorrect coding, I agree with you.
>>
>>54320556
try utilizing pdo instead to connect and query your database, mysqli/mysql isn't recommended due to security issues.
>>
>>54320652
>$row['Username']
defined where?

>$input=""
= is not ==

>$taken_v
should be $blank_v

>$passwordTwo
defined where?

>$valid_password
variable function name...

>('$user', '$password', '$name', '$dob', '$email', '1')
non prepared quest execution, disgusting
>>
>>54320691
Whoops, my bad. Yeah, I haven't proofread my own code yet. Just trying to get that first error out of the way. All working now.
>>
>>54320724
>if (!(strlen($input) <= 8))
some sort of obfuscation?
>>
>>54316119
Node, gulp, sass, livereload, nodemon, jshint,...
>>
>>54320724
>proofread my own code yet
When were you planning on doing that?
>>
how do I make a line like this with code? sos send help pls
>>
>>54320556
>INSERT INTO users (Username, Password, Name, DOB, Email, Access)
keywords as field names, wut
>>
>>54323032
http://stackoverflow.com/questions/2812770/add-centered-text-to-the-middle-of-a-hr-like-line
<div style="width: 100%; height: 20px; border-bottom: 1px solid black; text-align: center">
<span style="font-size: 40px; background-color: #F3F5F6; padding: 0 10px;">
Section Title <!--Padding is optional-->
</span>
</div>
>>
>>54323032
You don't. You use HTML and CSS
>>
>>54320556
You're gonna want to look into PDO. That query is VERY vulnerable to SQL injection
>>
Is there any meme.js that works for non-SPAs and still allows you to easily access the DOM yourself if you need to?
>>
>>54323084
>http://stackoverflow.com/questions/2812770/add-centered-text-to-the-middle-of-a-hr-like-line

I don't know how I didn't find this with any of my searches. Thanks for the spoon feed.
>>
>>54320556
I wonder if there are people who actually validate stuff like this. Why would you do this instead of reusable constraints?
>>
>>54323224
I wonder why there are people who still use PHP. Why would you use it instead of a decent language?
>>
>>54323245
You know, I just typed a long, exactly 2000 letter PHP rant as a response to your post, but then accidentally navigated away.

In conclusion: Fuck PHP and everyone who uses it, including cheap faggot shit webhosters who only offer faggot CGI LAMP stacks.
>>
>>54323168
I don't understand the question
>>
I'm doubting if I should put a website (wordpress based) on a webhost with dedicated resources (so pretty much a semi managed vps) or an unmanaged vps (but then I'm responsible for my own security).
>>
>>54323474
>>
>>54323474
>Fuck PHP and everyone who uses it
ma nigga
>>
I want to make a viewcounter on my own live stream page and thought about using websockets.
If a client is connected it counts as 1 viewer. I don't care about people watching a stream directly.

What server side should I use for that? Do I even need one or can clients talk with eachother?
I feel like this should be pretty simple, the server just counts how many connections are open and sends everyone the totalcount if it changes.

I'm a bit rusty with modern JS. I'm mostly maintaining ASP.NET applications at work made 10 years ago.
>>
God tier webdesign : http://www.chiptune.com/
>>
So I'm using brackets and live preview always works when I'm using html. Even when I add a new html page, it works. When I use CSS, live preview doesn't automatically update like html.

Please help.
>>
>>54325639
put the css in the html head
>>
>>54325692
I did put the link, but then I realized I had it mixed up. Thanks anon.
>>
What's the best online JavaScript interpreter?
>>
>>54326289
Chrome / FF dev tools

press ctrl + shift + i
>>
>>54326312
Are they seriously that good? I've tried them and am having difficulty adjusting to them.
>>
>>54309722
>so am I safe

case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;


Yeah m8, perfectly safe
>>
>>54322351
livereload → browsersync
jshint → eslint
>>
>>54311191
That's just HR. That's what they do.
They ask the devs what they need and then exaggerate the fuck out of it.

>Uh, it would be great if they already have some experience in Angular...
>Uh-huh, "Expert in the Angular Framework with at least 20 years of experience", got it.
>Umm, that doesn't-.... Nevermind, he should also know HTML5, CSS3 and Ecmascript 6(aka 2015)
>Got it, 2015 years of experience in HTML5, CSS3 and Ecmascript 6...
>And, uh, we sometimes, like REALLY rarely use node, usually just for a static render for our Angular apps for googlebot for SEO purposes... Actually it's enough that I know how to do that, it doesn't really-
>Okay, A billion years of mastery of the sacret art of the "Node" and 100% SEO scores through the bank required for each and every project, no matter if internal or external...
>There was this one time in like 20 years where I had to write this tiny cobol script...
>...
>>
>>54311337
>java script

Oh boy.
>>
>>54312104
You're using PHP as a templating engine, I see.

Stop. Now. IMMEDIATELY.
Use something that does this job properly and safely. Twig or Blade.
>>
>>54323084
This solution is shit. You can't use it on non-solid backgrounds.

Here is much better one: http://dabblet.com/gist/2502535/
>>
>>54309722
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";

You probably learned some sane language before starting PHP, and it's showing.

For some bizarre reason in PHP, the ternary operator's expressions are swapped.
>>
Has anyone used Sams Teach Yourself books?

I got his HTML,CSS, Javascript and just started to read it (beginner here). Looks alright but I was wondering if anyone had success with the material and how it is covered. If not, what would be another book along the lines that would be better?
>>
>>54326627
I think that blogs are a great resource. Especially blogs by people who know what the fuck they're talking about, like Google Developers.

The problem is that you can only see that a blog author has no idea when you HAVE an idea, so I imagine that this is quite hard.
>>
>>54302162
If I push trough today I might.
>>
So, i have these two things i am doing for fun and learning.

The code probably sucks, and the security is probably nonexistent. What should i do?

https://github.com/Admicos/FFABoard-RW
https://github.com/Admicos/AdmiTODO
>>
Opinions on my blog? Think the colour scheme do a ton of work imo:
http://127.0.0.1:8000/blog/
>>
>gradutate to an unrelated-to-IT-degree, but like to program a little
>get hired as a office assistant about 6 months ago on a company with 4 people.
>In the first week, they give me access to their site. It's more of a bussiness site, just to show the company.
>CEO tells me the always wanted an ecommerce
>mfw I tell him we can do this
>time passes, site is deployed
>in a few weeks, the site generated more revenue than the physical store

Now I'm up to promotion and I'm the only one trully managing and developing the site. Should I update the name of the position I'm at? I'm thinking about "Senior Develevoper". What do you think?
>>
>>54327194
uh
>>
>>54327194
boy
>>
>>54327162
Write tests to validate behavior. Then refactor the shit out of the php spaghetti.
>>
>>54327194
i r8 8/8
>>
>>54327201
you should pine for title too. keep your resume up to date with these accomplishments, and mesh with how current job openings are requiring skills.
>>
>>54327395
Cheers. Anything new I can add to it? I've got all the essentials, including tags
>>
>>54327449
Honestly, some of the contrast is a bit off. Things could be easier to read.
>>
>>54326539

Thanks for this, man. Glad I checked back. This works much better.
>>
>I ask intern to do simple stuff
>mfw he tells me it can't be done
>he doesn't tell me he can't do or he finds it difficult to do. it CAN'T BE DONE
>>
>>54327558
fire him
>>
File: Hzms34f.png (102KB, 746x717px) Image search: [Google] [Yandex] [Bing]
Hzms34f.png
102KB, 746x717px
>>54327558
forgot the pic
>>
I was thinking about taking up a hobby in bug bounty hunting specifically with respect to web app exploits. I've got a basic knowledge of python and am practicing everyday. What are the things I should look into? I'm not really looking to make a living but more hoping to make a lucrative hobby out of this. Any thoughts?
>>
>>54327558
People these days are unable to admit that their brains can fail. That they are too stupid / inexperienced / simply mistaken.

That's because teachers started with this "every kid is special" bullshit where everyone is told that they're geniuses who will change the world.
People don't fail at tasks - it's the tasks that are stupid. If they can't do something, then there's no reason to do it, because humans were obviously not meant to solve tasks of this caliber.

People make up the most ridiculous excuses for their stupidity or ignorance. For example, when someone can't give you an answer, it's often because they "Think too complicated".
People can acknowledge some flaws they have, like when they're too fat, too ugly, lack motivation, are a pathetic leeching neckbeard living in his parents' basement, but HOLY SHIT, their intelligence is a no-go area.
>>
Node vs php ?
>>
>>54327992
Node easily
>>
>>54327641
Well, you should probably learn html/css/js and have some knowledge of common js libs/frameworks (jquery, angular, react) since that's what web apps and sites generally use.

Also you should know a bit about databases since SQL injections or similar vulnerabilities are pretty much the first thing any would-be hacker would try.

You should know about things like cross-site scripting attacks and cross-site request forgeries since those are common. Also, REST, design patterns (especially MVC, MVVM), HTTP, Linux, Apache, Nginx, Node, and other techs that are commonly used.

I don't necessarily mean you need to be an expert in all that stuff, but you should know what everything I listed is at least, and have some level of familiarity with most of it. Meanwhile, cruise around github and look at the issue trackers for popular projects. See what kind of problems they've had and how they fixed them. Maybe solve some problems yourself. Eventually you'll get a feel for things. It also helps, of course, to have a dev job so your brain is soaking in code all day and you have access to your coworkers' brains as well.

After all that, you should have a good idea of what kind of things interest you. Go learn more about that. Eventually, you'll just sort of accumulate a critical mass or knowledge and start being able to solve more and more problems.
>>
>>54327748
>People these days

A certain percentage of people have always been narcissistic shit-bags, but other than that you're not wrong.
>>
>>54328141
Hey thanks for the really detailed reply. Looks like I have a lot of studying to do
>>
File: 1462132822630s.jpg (2KB, 125x120px) Image search: [Google] [Yandex] [Bing]
1462132822630s.jpg
2KB, 125x120px
>>54327599
>mfw you forgot the pic
>>
You guys , code for hobby or it's your job¿?¿
Easy question!!!
>>
>>54328270
Hobby
I am actually an English teacher but I also make websites for side-income
>>
I don't know anything about server stuff but I think I'm hosting a php server with my website on my computers local host but when I try to connect to it using my computers ip address + the port from my phone it doesn't want to connect
h e l p
>>
>>54328270
Job + new hobby

Previous hobby was emulator/game/graphics programming, but new things are fun
>>
>>54328270
Daily remnder that the act of writing code is called programing, not coding.
>>
>>54328355
nice autism meme
>>
File: dontgetbutthurt.png (359KB, 710x550px) Image search: [Google] [Yandex] [Bing]
dontgetbutthurt.png
359KB, 710x550px
hey guys i make 70k and i write all my css inline
>>
>>54328270
Both. I actually cleanly rewrite the things I work on at work for fun and for my own use.

>>54328313
How about you tell us what exactly your setup is
>>
File: Andre.gif (2MB, 255x191px) Image search: [Google] [Yandex] [Bing]
Andre.gif
2MB, 255x191px
>>54328405
Savage
>>
>>54328233
>Looks like I have a lot of studying to do
Imho it's better if you don't think of it like studying. If stuff like this interests you, you'll naturally gravitate toward it. Once you have the technical skills required to make something practical, you'll start to learn about new things automatically as you run into problems that need solving. If it stops being fun, you'll get burned out, believe me.
>>
>>54328431
>>
I'm trying to expand on this website I made for my database class. What frameworks/libraries should I experiment with for database stuff?

>>54328405
Absolute madman.
>>
>>54328442
100% truth. You have to do things and as a result come into contact with it. Don't set out expecting to study it all.
>>
>>54328313
First of all, I'd make sure the phone is actually connected to your home wifi and not over 4g or something, because you won't be able to access it from the other side of your router.

If it isn't that, double check that XAMPP or whatever is actually running. Also >>54328410
We can't help if we don't know what you're using.
>>
File: 1460841753785.gif (1MB, 320x180px) Image search: [Google] [Yandex] [Bing]
1460841753785.gif
1MB, 320x180px
>>54328469
Horrifying
>>
>>54328469
stop
>>
>>54328442
Yea I appreciate that. I am working in a field totally unrelated to this stuff but I've long had an itch to pick up some programming skills. But the itch itself felt a bit aimless as I never could figure out what it is I wanted to do with programming. App development and all that never grabbed me. I guess I have a lot of good memories zenning out doing logic problems in my uni's logic course and I've been wanting something similar. The desire to web app pentest was more out of an interest to explore code and maybe make some money all while getting that zenned out feeling again. Hope I can stick with this and follow a natural path like you're suggesting. If I do then your comment will have been a part of attaining that goal. Thanks.
>>
>>54328470
If you're going to ask for help, you need to give some details, senpai. There are like a billion different things out there you could use that depend on what exactly you're trying to do and what language you're trying to do it in.
>>
>>54328582
It's not web related, but I like to write automation scripts in python or bash. Maybe you can start with things like that.

I have a STACK cloud account, and my RPi is attached to it with WebDAV. Every hour it checks if there is something in my dropfolder, and then moves it to my inbox, inside a folder that has the date as name.

It's something simple, but it might help you find likewise project to start programming with. I usually suggest starting without a language and just learn Boolean logics and algorithms.
>>
>>54328707
>I usually suggest starting without a language and just learn Boolean logics and algorithms.
geez, do you think new painters should go outside and fuck trees too?
>>
>>54328770
I'm not saying to go without language for months. Just start of learning what Boolean logic is, get to know how it works by heart. And then learn how something like a for loop works.

If you start just programming without knowing those things there is a good chance that you just crash because you can't figure out how to do certain things.

Like a painter should know the results of mixing colours before he starts to paint.
>>
>>54328829
>Just start of learning what Boolean logic is
Not that guy, but isn't boolean logic just basically True or False? lmao
>>
>>54328625
Sorry for being vague, im not that good at asking questions.
Basically the entire site is done in PHP since I just learned it this semester. It works well enough, but its terribly sloppy. The database itself runs off of the sql database in XAMPP.
I was looking for something kinda easy to get into but challenging enough to read into more. I was thinking of a javascript library since I learned about some of that too, but there's so many out there.
>>
>>54328878
If, And, Not.

For us it's super simple, but I have seen new people struggle with it. Especially when you start combining. Like (!((X|Y)&Z)).
>>
>>54328829
I could explain everything there is to know about boolean logic to a 12 year old in like...under 10 minutes. Probably for loops too. None of that is complicated at all.
>>
>>54328979
Well I'm only talking from what I have seen.

It's really easy to write down, but to do it on the fly takes practice for some people. If it is natural to you then great move on.

I've learned it in school when I was 13. I was fluent with it after the first class, but for some people it took 5 lessons until they started to get a grasp of it.
>>
>>54328918
If you want to stick with php, look into larevel or symfony.

If you'd rather go into JS, you'll need to learn about node to do any backend/database stuff. You'll also want to know how to use AJAX to load data into a single page app dynamically.
>>
>>54328918
Wordpress or Zend
>>
Total noob question here. I'm almost finished making a website, then I'm gonna buy a domain name. After that, how do I actually put it up on the internet? It's a very small website with almost no user input, can Amazon Web Services handle it?
>>
>>54328829
Yeah no the best way to get started with something is to just play. Follow a tutorial or two then make simple stuff on your own.

I started programming with XNA. My first game was a little clicker game all done in 1 file, i didn't use loops or objects or arrays because i did not understand them. I had fun though.
3 years later i'm basically doing the same thing still: Follow some tutorials, then make stuff on my own, maybe force myself to study something every once in a while. But mostly MAKE STUFF.

The best way to crash a beginner is to overwhelm him.
>>
>>54302144
Is there something similar to Django, except for Rust?
>>
>>54329794
>can Amazon Web Services handle it?

AWS is probably way overkill. If it uses nginx or node or something like that, you'll need to use AWS or another cloud computing provider like Heroku or digital ocean.

If it's php-based you can get LAMP stack shared hosting for really cheap. I like namecheap, but there are a ton of them.

If it's a static site with just html/css/js and no backend database stuff, you can actually just github pages for free (Plus the cost of the domain name)

Deployment will vary depending on where you host it.

>>54329872
https://github.com/flosse/rust-web-framework-comparison
>>
>>54329984
Right now it's just basic HTML and CSS, I might add some JS and Bootstrap later.
>>
How much of a bad practice it is to save social media profile pictures links instead of the pictures themselves?
>>
>>54330027
Just use github pages.
https://pages.github.com/
You don't even have to buy a domain if you're okay with [yourusername].github.io
>>
>>54330029
I would imagine all social media API's have a method to fetch the latest profile picture
>>
>>54330158
Yes
The idea is to use that instead of downloading and keeping the image on my server
Is that a bad thing?
>>
>>54330193
>Is that a bad thing?
No. Abuse the API all you want so you can take the load off your server.
>>
File: 1415389806096.jpg (35KB, 529x566px) Image search: [Google] [Yandex] [Bing]
1415389806096.jpg
35KB, 529x566px
>get job as trainee
>do what the seniors do

what's the fucking point then
>>
>>54330307
they get to save money
>>
>>54328979

People always say that teaching basic logic is simple until they need to do it then they realize that what they thought they'd learnt quickly had been picked up over time on a need to know basis.

= vs == vs ===, for vs foreach, use of keys and pointers in foreach, if (function()) / if ($variable), switch, break and so on. Then there's the fun of recursion.
>>
>>54330307

Because it takes the Seniors 30 minutes to do what it takes you 2hours to do.
>>
>>54330414
That's why all our code is unmaintanable I guess
>>
>>54330397
>careful not to strain your back moving that goalpost, anon
>>
File: blog.png (33KB, 975x667px) Image search: [Google] [Yandex] [Bing]
blog.png
33KB, 975x667px
Started and finished my first micro site, a blog site in a quarter of a day with Django. Generic views are so versatile, and everything else works pretty seamlessly. Now I'm thinking I should move onto a lite imageboard, or since I've done games before, a grid-based game
>>
>>54330546
neat
>>
>>54330488

Those are all basics
>>
>>54330546

For shits and giggles you could try making delete and update work through ajax.

Important skill to know.
>>
>>54330597
I hear you. One thing that isn't visible here that I've implemented is pagination and search url queries. I'd like to make those 2 work through ajax as well. I know nothing about ajax, but it's definitely important, so I'll take that challenge up

>>54330556
Thanks fampai
>>
What do you guys think of w3schools.com? Are the tutorials good?
>>
File: 1419370037526.jpg (33KB, 480x454px) Image search: [Google] [Yandex] [Bing]
1419370037526.jpg
33KB, 480x454px
>250 word HTML assignment
>Haven't even started
>It's due tomorrow
>>
>>54330896
I haven't used their tutorials but I can tell you that the reference material on w3schools is extremely bad and you should refer to MDN instead wherever possible.
>>
>>54330928
What do you mean by reference materials? Is that the same as their tutorials?
>>
>>54330911
>250 word
>html

I don't understand, you have a writing assignment about html, or...?

In any case, isn't 250 words like...3 paragraphs? You're worried about writing 3 paragraphs by tomorrow? That should take you less than an hour anon, you should just drop out now.
>>
>>54331034
It's a meme you dip
>>
Guys I need help
I have a meeting tomorrow with some news guys, they want to make a news/magazine website, but they don't want it to be WordPress.

I don't know how to make a CMS yet, only know HTML/CSS/JS.

What do?
>>
>>54331276
Pull your dick out in the middle of the meeting. They won't give a shit what CMS you use after that.
>>
>>54331103
omg so funny ur hilarious xoxo hehe
>>
>>54331276
Use Django. Python isn't hard to learn.
>>
>>54331276

Use another engine like joomla

Only retards do sites from scratch.
>>
>>54328470
>>54328431
I don't get it?
>>
>>54331575
I like Python's syntax, I'll check it out, thanks.
>>54331618
I will just purchase a html template from themeforest and use that anyway, I just don't know how to integrate that with a cms
>>
>>54327641
Go for it. It can be damn interesting.

We (a small agency) built a small webapp for a big national company recently, and all the time we were told there's no time or budget for security. Emails containing spreadsheets with plaintext passwords, passed around by middle mangement types at their end, no hope of security even if we tried. Which we did. Ah well, short lived project for a one off event, not gonna get too bent out of shape on it, just did what we can to not be complete cowboys about it - the cheap, biggest bang for buck stuff like CSRF tokens, sanitising output for XSS, sanitising input for SQL injection and locking down the server (no password auth allowed for ssh, non-standard port, removed nginx version headers etc.).

Then they got a huge international company to pentest it for some reason, long after the bean counters had waved off all the insecure shit we advised them against. They likely paid more for that pentest than they paid us to build it. Anyway that came back and I learned a couple of new things from the report.

1) CSV output should also be sanitised, because the kind of middle-management-office-wankers-who-cant-use-computers and who sign off on insecure shit like this also like to use software like Microsoft Excel which can run fancy formulas that do a little more than maths! (http://www.contextis.com/resources/blog/comma-separated-vulnerabilities/)

2) SSL3 poodle.

3) Pentesting is about throwing shit at the wall and see what sticks. You don't need to learn each attack individually, you just use tools that try as many as possible. I saw links in our DB after the test that lead me to this tool suite https://portswigger.net/burp/

4) At the end of the day the haircuts decide whether it matters. Security is just a cost benefit analysis to them, they simply don't get it.

I played this wargame a while back, learned a few things, but didn't get too far (finished Bandit). You might enjoy it http://overthewire.org/wargames/
>>
File: screenshot_799.png (70KB, 1600x1132px) Image search: [Google] [Yandex] [Bing]
screenshot_799.png
70KB, 1600x1132px
>>54331276
Apologise that you can't help them, then direct them towards a more suitable freelancer or agency.

I've taken over projects that people obviously didn't turn down when they should have, I've seen the mess that gets left behind. If you don't know how to achieve what the client wants, don't take their money. It's not just immoral, you're also going to fuck yourself over when you can't deliver.

I've done it myself, because sometimes you don't know that you don't know enough to deliver a successful project. I spent months on it, sleepless nights, completely stressed and quickly burned out after delivering a subpar project well past the deadline. I also didn't have the balls to ask for more money for all the extra time it was taking me so I was working for nothing while having no spare time to work on paying projects. I burned through my savings, cut back my spending to practically nothing and barely made it out in one piece. It didn't end with a big shouting match and burned bridges with the client, but it wasn't exactly a cork-popping celebration either.

Know your limits. If you really want to work on the project try to arrange it so you subcontract on the frontend. Or if you fancy yourself a biznis man, outsource the backend stuff to someone more capable. Just do what you think is best for the client (If you like them. If you don't take their money and give them a malware'd up Joomla template).
>>
>>54332079
>this one faggot that keeps posting dunning-kruger
people know what it is you dumb shit
>>
>>54332105
Maybe you're just experiencing the Baader Meinhof phenomenon anon.
>>
File: wat.png (13KB, 565x464px) Image search: [Google] [Yandex] [Bing]
wat.png
13KB, 565x464px
>Applying for a web development position
>See this

Triggered.

I get it, they're taking a lighthearted approach to finding out more about their potential employees, but what the fuck?
>>
>>54332128
>new piece
people know what it is you dumb shit
>>
>>54332140
>He doesn't realize that these are actually some of the most important questions in web development

I bet you can't even sell a pen
>>
>>54332079
When I started out I didn't know how to make a simple HTML website.
I learned by doing and the customer got what they wanted.
Just because I don't know how to achieve what they want at the moment, doesn't mean I won't be able to learn and deliver it.
I know my limits, and I'm pretty sure I will figure out how to do this in a short time.
So your post is invalid.
Also they DONT want to give enough money for this kind of job, they're looking for a very cheap solution, nobody who actually knows how to do this shit will accept that money.
>>
>>54332140
i'd rather answer shit like this 50 times than write another cover letter and re-hash my resume in 12 different forms
>>
>>54331276
Wtf? Why am I hearing from my colleagues that basically everyone wants their site on WP then? Why is everything I read here completely different from my experience? I still don't get it what's so wrong with WP and other customer/business CMSes.
>>
>>54332189
the client is already knowledgeable enough to know that they /don't/ want WP so consider it different circumstances than the usual "we have no idea what we want" = wordpress solution
>>
>>54332189
They probably took advice from some retard who said WordPress was not for them, when it is actually just what they are looking for...
I can convince them to use WP tomorrow fairly easily but I just wanted to know what other options I had if they resist.
>>
what npm module(s) should i use to add together two (2) integers?
>>
>>54332174
>>54332184
Tell me, lads, how you'd answer that jelly-bean question then?
>>
>>54332140
I am still a student and I already completely hate web development culture and everything connected to it. Fml.
>>
>>54332219
give me a few days, I'll have something whipped up for you
>>
>>54332140
If you get that job, prepare to sit in the middle of some open floorplan office and get shot with nerf darts all day by manbabies with desks full of animu figurines and titles like 'code ninja'
>>
>>54332227
Obviously it's a question about how you'd handle sorting algorithms.
>>
>>54332227
you can either: sound uptight and answer 100% logistically ie "well is the plane flying? are the beans in packages?"

or

you can answer casually ie "i'd call local schools" or "i'd make it rain candy!!!!!"
>>
>>54332257
>"How would you unload a 747 full o-"
>ALLUAH ACKBAR!
>>
>>54332246
more like getting paid to sit in the room, which sounds a lot better than unemployment/less money
>>
>>54331821
I don't follow all of this but that's a good thing. Thanks for the info anon
>>
File: wat2.png (11KB, 538x178px) Image search: [Google] [Yandex] [Bing]
wat2.png
11KB, 538x178px
>>54332246
Okay senpai.
>>
>>54332140
>that font rendering
it looks like you use windows therefore you aren't qualified for the job
>>
>>54332441
Please buy me a Macbook so I can be as cool as you are.
>>
>>54332441
>Not using linux but modding it out to make it look like windows 10

It's like you don't even understand the concept of "I was only pretending to be retarded.
>>
>>54332464
i run linux in a vm m8
>>
javascript is such a shit langauge

but it has great frameworks and community around it
>>
>>54332518
how is it shit? As a reflective language, it is pretty incredible
>>
>>54332518
Who are you talking to?
>>
what does /wdg/ think of MDN?
>>
>>54332533
it's dynamic and weakly typed, function scoped variables are annoying, variable hoisting is annoying, callbacks make code into spaghetti

some of this stuff has been fixed or can be fixed through use of libraries

except the typing
>>
>>54332581
It's been linked in basically every OP for months, so obviously we think its shit.
>>
>>54332307
I'm sorry anon, but I just don't think you're a fit with our culture here. We're gonna have to let you go.

>>54332409
kek
>>
>>54330307

when something breaks or goes horribly wrong, and you have no idea why, you'll find out whether the seniors are really any better than you.
>>
>>54332604
>it's dynamic and weakly typed
And yet you praise the frameworks around it. Those frameworks exist because of JS' reflective properties. You'd have to jump hoops to get that kind of functionality for a statically typed language.
>function scoped variables are annoying
Agreed
>variable hoisting is annoying
It's meme-tier so I don't pay mind
>callbacks make code into spaghetti
You've outed yourself as a noobie programmer. Callbacks are an important part of development in any area, be it in front/back-end web dev, gamedev from when C was popular, graphics programming through programmable pipelines, etc. You can't emulate callbacks in any useful way any other way, and at that point, you may as well have callbacks
>>
>>54332692
Callbacks do turn code into spaghetti quickly. Not sure why you are saying "hurr ur dumb" when it's true. You have to manage them properly or you end up with some monolithic thing that's difficult to follow without organizing it somehow. How many people actually manage this properly?

And weak typing doesn't mean you suddenly get extra functionality. You just end up with a headache because you get ridiculous runtime errors when the addition operator coerces an array to a string or something retarded like that. Java is static/typed and frameworks like Spring and Hibernate are using reflection to work.
>>
>>54332785
>How many people actually manage this properly?
They aren't awful at programming. What do YOU find difficult to understand about callbacks? How do you envision tools like gulp working without them? Or timer functions in JS/SDL? Or anything else where you want to describe a transformation of data without repeating yourself everywhere and violating DRY?

>And weak typing doesn't mean you suddenly get extra functionality
Well you gain no extra functionality from having it. Maybe if you were able to explicitly define how much space your numbers could hold, you could save a bit of memory, which is negligible considering JS interpreters are quick, but even then if you're confused because your arrays are being coerced into strings, you just don't understand your code or programming
>>
>>54332847
>What do YOU find difficult to understand about callbacks
Nothing. I'm saying that they make code harder to read. I use async to manage them.
>your arrays are being coerced into strings
They aren't. I just don't like the idea of that being a runtime exception.

I like how all of your arguments devolve into personal attacks. I've won just fyi.
>>
>>54332881
>Nothing. I'm saying that they make code harder to read.
So you are terrible at programming

>I just don't like the idea of that being a runtime exception.
On a reflective, interpreted language..

lmaoing @ your life fampai, consider being a better programmer instead of crying about not being able to understand simple concepts
>>
Should I learn to code? What are the benefits and how long does it take to learn?
>>
>>54332881
Callbacks don't always have to do with concurrency. Shows how much you know
>>
>>54332189
wordpress is shit lol
>>
>>54332189
Because you're building shitty marketing sites for a glorified SEO firm
>>
Why would anyone willingly do this shit? I spent the last month doing a website in php using silex and twig and I wish I was dead. Whats worse I have put so much effort and have the site pretty much perfect and ill still probably fail the module.

Lecturer wants us to test and document php and I don't have a fucking clue how too.
>>
>>54333534
Maybe not all of us are writing shit for a class in PHP using silex and twig
>>
>>54333534
>php
That's why

I moved to Python/Django and webdev is literally the smoothest and most fun thing. Once I pick up SCSS and npm tools like Gulp, it's just going to get better
>>
So I've been playing around with Node/Express, and I've started building my own APIs.

I've been using Postman to test routing and all that. When I do a post request in Postman, I can create a new user. But if I use anything but application/json Content-Type, it 404s and wont POST any data.

I'm a newb, so any help would be ace
>>
Why isn't my node.js server running in one very specific building in my school?

var express = require('express');
var app = express();
var http = require('http').Server(app);

var GetAddress = function() {
var os = require('os');
var ifaces = os.networkInterfaces()

for (i in ifaces) {
for (j in ifaces[i]) {
if (ifaces[i][j].family === 'IPv4' && ifaces[i][j].internal === false) {
return ifaces[i][j].address;
}
}
}
}

http.listen(3000, '0.0.0.0', function() {
console.log('listening to '+GetAddress()+':3000');
});
>>
I post here regularly about it because I like to brag

I work at Facebook :D
>>
>>54333534
Real PHP is fun. Boring school PHP is stupid.

Anyways, got an interview for launchcode, apparently my awful answers were good enough. Maybe I'll get a job after all.
>>
File: amazonclicks.png (9KB, 308x509px) Image search: [Google] [Yandex] [Bing]
amazonclicks.png
9KB, 308x509px
>>54333988
>bragging about wageslaving

Not a bad gig though for the time being, grats on landing it.

Let's be real though for a second. Facebook has 5 to 10 years left before it's dead.
>>
>>54334216
what does that picture mean?

5-10 years for the facebook.com but the company is expanding into other markets and will eventually go the way of Google->Alphabet so they arent just a social network.
>>
>>54334216
Is landing a job at google worth it?
>>
How do I get this to work? I'm new to Sublime extensions.

https://packagecontrol.io/packages/LiveReload

I would just use Brackets but it's broken.
>>
It's my idea or vertical align does fuck all?
>>
>>54334608
If you can stand California? Definitely.
>>
>>54334757
Fuck California.

Oh well.
>>
Should I know HTML/CSS WELL (Im a bit of a newbie but can read html and write simple html css) before I jump into javascript?
>>
>>54334871
I would recommend learning Html/Css pretty well before doing any hardcore Javascript.

You don't necessarily need to know them inside out, but with Javascript, it can be a lot more powerful if you know how the Dom works
>>
>>54334883
At what point would one know HTML/CSS "pretty well"?
>>
>>54334871
You won't need them to learn javascript as a programming language.
You'll need them when you're using the dom api to do shits on the client
>>
>>54334896
I'm not sure if there is a specific answer, but it should only take a few days to understand how it all works.

As long as you can build a simple site with pure html/css without a lot of external resources, then you know it well enough to start using Javascript to its full extent
>>
I themed my site to be Reimu

https://github.com/chiru-no/chiru.no
>>
Anyone can answer this?
>>54336870
>>
>>54337063
post the first 2 lines.
Thread replies: 255
Thread images: 30
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK