[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: 317
Thread images: 28

File: Z6zEcJj.png (731KB, 824x553px) Image search: [Google]
Z6zEcJj.png
731KB, 824x553px
/wdg/ - Web Development General

Previous Thread: >>56391280

> 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/
https://youtu.be/JxAXlJEmNMg?list=PL7664379246A246CB - "Crockford on JavaScript" lecture series.

>Useful Youtube channels
derekbanas
thenewboston
learncodeacademy
funfunfunction
computerphile
codingrainbow

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

>Backend development
https://en.m.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
https://youtu.be/sBzRwzY7G-k - "2016/2017 MUST-KNOW WEB DEVELOPMENT TECH - Watch this if you want to be a web developer "
https://youtu.be/zf_cb_Nw5zY - "JavaScript is Easy" - If you can't into programming, you probably won't find a simpler introduction to JavaScript than this.

>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
>>
Fundev.tv/timer
How's my timer?

The actual timer is supposed to be styled like that.
>>
I landed an internship at as a full-stack developer for a company that does ground-up site development on a contract basis.

We do most of our sites in ASP.NET MVC with Angular, though we have one or two clients that we built using Kentico.

Pay is $15/hr, supposedly increasing to $18/hr, then $40,000-55,000 starting salary if I make the cut.

I'm a month in and they seem pretty pressed with my skills and technical acumen so far.

Any tips from more senior devs?
>>
I'm logging parameter names and values that don't show up in my white list to a .txt file.
The file is not executable, so there are no security issues with this, or are there?
>>
fuck, my domain name is expiring and renewal costs $25. fuck it, I'll just let it die, I'm too poor for this shit.
>>
>>56440260
fuckin lol. where are you at? i hope you're in ukraine or some shit because that is peasant wages. my frist junior dev job in the middle of no where flyover usa was 60k, and it went to 80k in 6 months
>>
File: wfefwfw.jpg (124KB, 1000x667px) Image search: [Google]
wfefwfw.jpg
124KB, 1000x667px
>>56440260
>$15/hr
lmao that's burgerflipping tier
>>
>>56440872
My starting salary at the moment is 2k/month gross, and I'm perfectly capable of paying my bills, buying groceries, and saving some on the side.

My contract expires in 6 months and I'm expecting a renewal with a huge bump in salary and bonuses.
>>
Is Angular MVC? How strict and opinionated it is?
>>
FUCK WEBPACK AFTER 2 HOURS OF EBOOK READING MY APP JS BUNDLE IS STILL WAY LARGER THAN IT SHOULD BE
>>
web developers are codemonkeys
>>
>>56440872
>>56440968
...he's an intern.

They make that where I live in the US even though a junior dev gets 60k+

Hopefully he just uses that comoany for experience and goes elsewhere as soon as possible. I would be applying already if I were him.
>>
>>56441166
No. Angular is for front-end stuff only. It's usually combined with something like Node for handling the back-end MVC stuff
>>
>>56440193
Sexy voice m8
>>
>>56442615
Thanks bb.
>>
File: mvc.png (80KB, 1024x512px) Image search: [Google]
mvc.png
80KB, 1024x512px
>>56440260
>ASP.NET MVC
>with Angular

Does anyone know what MVC even means anymore?
>>
>>56440968
Could be worse, that's double minimum wage in some states.

Could be even worse; Like me, I can't find tech jobs and I refuse to flip burgers with a CS degree so I'm basically living off my parents right now waiting for my break.
>>
So what's the point of npm if I don't use node?

Milligram framework installs with bower or npm but I don't use either.
>>
>>56443141
i agree with the sentiment but the image is poorly done
>>
>>56443636
having a package manager? you don't have to use it but its convenient
>>
Purecss is getting really awesome.
>>
>>56443141
ASP.NET MVC is official name for subset of ASP.NET framework.
>>
>>56443877
Thanks autismo.
>>
Tomorrow is my third day at the new gig. Custom web dev company. Working with PHP (Laravel, Symfony, Wordpress) and ASP .NET.

I'm 21 and it's paying $75k feels good
>>
Any of you hear of devwars?

I think I'm going to sign up. We could make team 4chan or something.

I'm just reading about it, but seems you have a team of 3 vs team of 3. You have 1 hour to make a website to specifications together.
>>
>>56444010
Good portfolio or CS degree?
>>
File: 1461424397218.jpg (967KB, 4575x4575px) Image search: [Google]
1461424397218.jpg
967KB, 4575x4575px
>>56444068
>team 4chan
>>
>>56444010
>PHP
>$75k

Your life sounds piss easy. I envy you.
>>
>>56444097
It could be pretty memer.

Actually probably want a non-4chan name so we can use the stuff on our portfolios.

I think competing in developer competitions would look pretty cool on a resume. It shows teamwork and shit.

Anyone down?
>>
>>56444197
You just need buzzwords on your resume. The main obstacle to you getting a job is a non-technical recruiter who thinks that a computer is a magic box that makes Facebook appear at their desk. They're very unlikely to give a shit about developer competitions.

If you want to impress prospective employers, just throw some of your projects on github, or contribute to some open source shit.
>>
>>56444391
I don't think my code is up to opensource standard.

I made that timer under the OP. I still do conditionals like if { } else { }.
>>
>>56444657
How else would you do it?
>>
>>56444657
Conditionals are like 66% of all programming.

If your code works its up to open source standards. The decision to include your code resides with the individual that maintains the project.
>>
in my last semester of uni, i'm going through self learning angular basically. any ideas for good tutorials or applications of angular i can look at for a good idea on how to further my knowledge in it?

the professor does screencast videos but they really aren't so helpful, he just gives us completed examples he has done and then explains them in the video.. watching it though i haven't really gotten an idea on how i can use angular though so far
>>
>>56441598
stick to a boilerplate anon
>>
>>56444709
? and :
>>
What's the best language to implement a simple chat in? I considered Python, but i'd like your thoughts on it.
>>
>>56444780
Write a nested ternary operator that is readable and I'll eat my own fedora.
>>
>>56444867
anything with a websocket library.
>>
>>56444780
Normal if is usually more readable and suitable than ternary operator. Ternary is usually for conditional variable assignment.
>>
>>56444738
I dont really get how git works.

If two people branch main working on two different things, who gets to commit?
>>
Be Honest, Am I barking up the wrong tree in learning webdev?

Alight, so here's my plan. At the end of this year, I'll be finishing uni. I'm planning to go teach English in China at the end of this year because I've desperately wanted to travel for as long as I can remember.

My plan is to teach myself webdev (rails/django, js, etc) (I already have a good grasp on ruby and python) throughout this year, and then do freelance work to supplement my income in China. And then, eventually, probably after another year in China, break the chain completely and become a digital nomad. Travelling, living in cheap places, and doing web dev on the side.

Please tell me, is Web Dev right for me, or should I look into doing something else such as copyrighting? I'd really like to know. Would love to hear from anyone who's doing something similar.
>>
File: screenshot.png (1MB, 1280x800px) Image search: [Google]
screenshot.png
1MB, 1280x800px
>>56440158
Just made & published a new tab page to the Chrome web store. Mostly just cause I wanted to make a thing.
If you guys want to check it out and give me feedback I'd appreciate that.
https://chrome.google.com/webstore/detail/geofkknhdniphaaggagchgfmfnopofgk/publish-accepted?hl=en-US&gl=GB
>>
>>56445325
Do you know Chinese? I always hear about this English teaching thing but no one mentions if they know the language or not.
>>
>>56445529
No, and as far as I know, you don't need to
>>
>>56445325
If you're gonna do all of that then don't limit yourself to web. Branch out a little more.
>>
>>56445582
I..might do this in Korea.
>>
learning django for shit and giggles

Planning on learning TypeScript + Angular 2 later. Maybe throw a Flask + ng2 site down the line
>>
>>56445828
But what we really want to know is, what will you have for lunch tomorrow?
>>
>>56446131
French Dip from Schlotzsky's.
>>
>>56445828
Ever consider rails. I was a flask dev who moved to rails it's pretty cool framework.
>>
>>56446364
was railin your mom with my flask last night
>>
>>56444197


I'll design the team logo
>>
File: aaa.png (11KB, 1454x294px) Image search: [Google]
aaa.png
11KB, 1454x294px
Been stuck in 6% for a week now. I'll never be a C# pro.

https://www.udemy.com/csharp-advanced/
>>
>>56444928
Hopefully, there's someone actually checking out that shit and checking for merge conflicts before merging either of those branches into the master branch. If not, shit happens, stuff gets fucked, and there's a shouting match involved.

>I don't really get how git works.
Neither does the average person. Hell, I just have a small script for pushing up to GitHub just so I don't have to be assed to do everything twice in a row.
>>
File: wew.png (254KB, 2490x924px) Image search: [Google]
wew.png
254KB, 2490x924px
Alright /g/, am I correctly protecting myself against SQL injection?

> pic related
>>
Yesterday I compiled a supposedly "cross platform" v8 pinvoke library (vroomjs) for Linux... After commenting out the Windows specific code and adding certain keywords that GNU requires which clearly the Visual compiler does not, it finally compiled.

Reminder, if you're not using Linux to develop, don't you dare pretend you're capable of anything cross platform. Us genuine cross platformers are burned by Linux and chilled by a constantly freezing Windows. We are forged.

And you come around with some library you've clearly only ever developed/compiled in windows and call yourself cross platform? This cunt was even using the Windows api for fucks sake. Paul you are a faggot.

And yeah I'll upload the .so file when I've fully tested it. Ideally, then reactjs.net will work by installing v8 (it's in the ubuntu repository) and then dropping the libvroomjs.so file into your usr/lib folder. Server side rendering with mono is coming.
>>
>>56447167
yes but are you seriously making a connection to mysql for each query you run???
>>
This seems like the best place so I thought I'd ask,
I have this project I'm working on in which I'd try to create an application wrapper for my uni's website, but the website itself isn't mobile friendly or dynamic in any way. How would I go about doing this?
>>
>>56448050
you dont
>>
>>56447167
>programming in a language other than English
>expecting English speakers to understand enough to help
If you sanitize inputs by stripping all non alphanumeric characters with regex, you'll be fine no matter what antiquated technology (lolphp) you're using.

>>56446511
Stick with me and I'll make you great. Whenever you see someone webdeving with mono and their own truly cross platform libraries, you know it's me.

>>56448038
Obviously I'm not a php dev, can you keep the connection static in php so you only have to open the connection once? I could imagine renewing that connection with every request would be extremely slow.

>>56448050
If you want something that truly works with mobile, you'll have to redesign the site. For instance, side menus have to go and be replaced by hamburgers. The track on each side of the content needs to be manipulated so it shrinks with mobile.

>application wrapper
Sorry, what? Could you get away with scrapping the site and just rerepresenting the data?
>>
Does anyone have a copy of this? http://formvalidation.io/download/

I can't seem to find it anywhere for free. Before you ask, yes I know there are other from validators out there but this one has all the features I need.
>>
>>56442104
Fucking retard, Angular is MVC
>>
>>56448038
why not lad?
>>
Hello /g/ i just learned html, css and wondering if i should start learning javascript or css preprocessors also if js if egular js or straight js lib. Any idea what to do next?
>>
Learning Angular 2. Components - View / Routes - Controller / Services - Model?
>>
>>56445325

1. WebDev nomad is totally possible.

2. Don't limit yourself with Ruby and Python, there's much more PHP code floating arround.

3. My piece of advice: Don't freelance before you have at least 3 years of employment. There's a lot of stuff to learn, best practices, how to work with customers and so on. If you start from the scratch you will make a lot of mistakes. Furthermore you want some savings before going lone wolf. You don't start WebDev and magically get money on day one, first you have to put some effort in this shit (not only technically wise, but also about getting customers) and if things work out well - you will get payed. Often you'll find there's a lot of problems about what people expect you to do and what you expect to do.. i.e. how many times do you "adjust" their website? There are people out there who let you chnage their site work for half a year unless you stop them. So get some employment, git gud and THEN go freelancer.
>>
>>56448795

No, Angular is "Model View ViewModel" (MVVM).
>>
>>56449324
start with php, lad. JavaScript is a huge clusterfuck that you should learn lastly
>>
>>56449324
The answer of >>56450115 is bait, avoid PHP at all costs. You'll need Javascript for the frontend, it's the next logical step. Learn the basics of Javascript and then move to a framework / ecosystem, I recommend React
>>
>>56447994
This guy here.

Didn't work. Still getting the run time error that it can't find react.environment. For some crazy reason, I think it might work if I recompile, but I doubt it. I'm also thinking that the geniuses behind these projects (there's at least 4 different projects I probably need to read the source of) decided they needed to specifically use a specific version of the v8 library... Which doesn't exist for Linux.

Again, if you're bragging about cross platform, holy fuck actually test cross platform, especially Linux. In web dev, Linux is much more important than OSX and I don't care how any dicks you suck to think otherwise.

>>56450115
Why PHP? I've only just realised that there are things PHP can do that other languages can't, but if you just need a backend language it's literally a free choice. Pick whatever, including JavaScript.

>>56450255
>bad advice is bait
Or... He could be justifying his baby duck syndrome.

>react
I could argue that this is bait.
>>
Are tablets relevant?
We just noticed that our design looks terrible on a tablet unless flipped to widescreen and fixing it would waste another workday
>>
Does anyone know if employers take FreeCodeCamp seriously? I'm currently working through the Front end dev section and was hoping it would supplement my degree and make me stand out from other computing students.
>>
>>56450255
>avoid PHP at all costs
No.
Stop being a hipster.
>>
Which PHP framework do you use /wdg/?
>>
>>56451149
Slim, Laravel
>>
So im learning php and i want to know something, is this correct way of using classes

class:
<?php
class test {
public function GetV($v){
$v = $_GET['v'];
echo $v;
}


}

?>

and in index
<?php
include_once "classes/class1.php";

$test = new test();

$test->GetV();
?>
>>
>>56451276
yes, that is the correct way
but use require_once instead
>>
>>56451276
Remove the trailing ?>. You don't need it and it will prevent accidental output.

Also, try to use autoloading.
>>
File: Selection_052.png (30KB, 1653x234px) Image search: [Google]
Selection_052.png
30KB, 1653x234px
>>56451384
>Also, try to use autoloading.
this is very nice, thanks anon
>>
>>56440968
that's double minimum wage, so not, it's not
>>
>>56451149
Phalcon, Slim, Laravel, Symfony
>>
Does SMACSS make sense if you use a CSS framework like bootstrap or purecss?
Because I have a lot of framework related selectors, e.g. for layouts, so a layout file doesn't make much sense to me.
>>
>>56451992
If you had to pick laravel or symfony, which one would you choose?
>>
>>56452103
It depends on you and your project, I think.

To be honest, I never chose any of those two. I've only worked on projects with those already implemented.

Are you working on something big? What does your project need?
Or do you want to learn? Is it a hobby or is it to find a job?
>>
>>56452245
Or do you want to learn? Is it a hobby or is it to find a job?
I worked as freelancer but i made everything from scratch always.
Now i want to get job in some firm but there i always need frameworks and as much i can see most popular is laravel.
>>
Has anybody here used SailsJS? It seems like a decent Node framework.
>>
Should i be learning Laravel 5 as my first framework if i want to have a job and make a profit?
>>
>>56443615
how does this happen? why are we required to put years of time towards a STEM degree and not be guaranteed a job fresh out of school? I thought the point of working toward a STEM degree meant we didn't have to suck dick for a job like everyone else.
>>
>>56452311
Learn both, really. They're not that complicated and you don't need to know everything about them before jumping on a project. You usually learn as you practice.

Make a couple different projects for each to know what they're about, what their subtilities are; projects that are challenging enough for you to read the documentation (even if they're clone of something already made), and I think you're good to go.

In my area, no job required to have years experience in either framework. I think it would be a bad idea in web dev to stick to a particular technology.

In your resume, state clearly somewhere you are a fast learner and can adapt quickly. It's the best quality to have when joining an ongoing project.

>>56452330
I did not use it, but my friend had a project on it, I gave it a look and it seems pretty good, yep.

>>56452392
I would suggest to first look at job opportunities in your area.

A couple years ago, I listed all job opportunities in my area and for PHP dev, Laravel came first (Symfony close second just by one off, if I remember). So Laravel seems to be very popular, yeah, but you never know what your local companies are using. Maybe you're better off learning something entirely different. Check it out.
>>
so I ve been learning js for the past few months and want to go learn a framework now.
Is react really faster than angular? also what is the difference between angular 1 and 2? should I just go at angular 2?
>>
>>56452463
https://medium.freecodecamp.com/angular-2-versus-react-there-will-be-blood-66595faafd51
>>
>>56440158
Anyone know of a small simple excel like grid system that supports websockets? I've used jqwidgets on past projects but I want to keep this project small and bloat free; jqxgrid loads like 12 dependencies for full functionality.
>>
What do you guys think of progressive web apps? It seems like the next logical evolution of apps.

https://developers.google.com/web/progressive-web-apps/

tl;dr: install an app directly from the browser (it's more like a homescreen shortcut though) that runs like a native app and also works offline.
>>
>>56452463
Whatever you decide, don't even bother with angular 1.
>>
>>56452441
Honestly, it's all a scam. People always told me "as soon as you get a degree you'll get tons of job offers", fuck that noise. Some people put ,more weight on work experience than the actual fucking degree.

If I had to do it all over again I'd skip college, get a few certifications, and start building a healthy work experience portfolio. The rate at which technology changes means your degree, technically, should be basically of little relevance after ~5-10 years since a lot of the content will be outdated. That's why for CompTIA certs for example, you have to renew them every 2 (or 3, I don't remember) years.
>>
New guy here,

I am interested in a career in Web Dev/ Software Dev etc.

Are there any reputable Bootcamps that aren't just a waste of time and money? I've been interested in a place called Dev Mountain, but don't want to go all the way out to fuckin' Utah to waste 10 grand. It's a pretty intensive course, basically a full time job.

How easily can you land a junior dev job with only a few months experience?

Note: I am totally new to even HTML/CSS, just now learning the syntax on my own. Any advice or feedback is helpful.
>>
I like to rice my work environment here and there, sometimes with cute little anime girls in the background, how do employers view this? does this trigger a flag?
>>
>>56452746
in Serbia you have for free

But you need to sign contract and if you dont come at every class you need to pay them, or if you leave,
>>
>>56452746
whats the appeal of bootcamps? What do they offer that you can't already find on the internet or books?
>>
>>56452775
Basically, the classroom structure is what I'm looking for here. I feel that learning all by myself would result in bad habits, and increased odds of not understanding the concepts fully. Plus, being surrounded by others doing the same thing would make things easier and be extremely helpful.
>>
>>56452769
Would graduating a Serbian bootcamp be enough to get a job elsewhere?
>>
>>56452839
i dont rly know, that was some international shit, teachers from all over the europe
>>
>>56452441
Degree can help you get your first job and get some more official jobs.
>>
>>56452463
Learn React but don't fall for the Redux meme (use mobx instead)
>>
File: sam.png (96KB, 1920x1080px) Image search: [Google]
sam.png
96KB, 1920x1080px
Hi, i want to start a web application that allows people to group up if they want to travel around the world because in my country the existing ones have a 90's layout and aren't exactly intuitive plus they miss a lot of features.
Basically there are three roles beside the administrator: the registered user who can join one or multiple groups, a group administrator and a trip administrator, with special privileges of course. Content types include groups, trips and articles. User should also be able to pay a deposit for the trip they want to join.

How would you approach such project? I mean what kind of framework would you use for backend and frontend? Can post more details if you are interested
>>
>>56452746
>Interested in web dev career
>Isn't even comfortable with HTML / CSS
Before you go to a bootcamp to waste money to realize in 1-2 years that you don't like webdev / programming:
Learn basic JS, then a JS front-end framework and then build small 3-4 sites before you decide on your career.
If you still enjoy web dev you can go for it (also you'll have a portfolio already depending on your sites), otherwise you saved some grands and maybe some time because of a poor career choice.
>>
File: vid.webm (1MB, 1920x1080px) Image search: [Google]
vid.webm
1MB, 1920x1080px
Can someone tell me whey onclick script wont work in firefox but works in chromium?
So, when i click on video in firefox, it goes frame by frame, video starts only if i press space.
>>
>>56453522
Show code.
Also I'd like a handy from than demon
>>
how the fuck i get better at webdev? I know html, css and basic php + some little js. i need some projects to do, but i got no fuckin idea what to create
>>
>/underpaid freelance general/
>>
>>56453522
It should play if you click the play button on the player instead of clicking the video. When you click the video I think it plays and then pauses immediately, I don't know why but it happened to me with 4chan webms too.
>>
File: 1457667333440.webm (2MB, 1156x650px) Image search: [Google]
1457667333440.webm
2MB, 1156x650px
>>56453744
it is simple anon
im using html5 video
var myVideo = document.getElementById("videoWebm");

function playPause() {
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();

}



>>56454060
here is script that i use
>>
>>56454090
You try with code brackets around if? I dont know js that well
>>
>>56454247
it works in inspect/console
problem is when i click with mouse
>>
>>56454090
I don't see an event listener anywhere
>>
>>56454090
Holy fuck, does this woman have a youtube channel?
>>
>>56454297
Olivia Jensen

>>56454288
llolo thanks, i fixed it
>>
>>56453362
My plan is to learn html/css then JS anyway, so that all is bound to happen anyway. I'm just wondering if these bootcamps are actually a plausible route to a new career, or if anyone has experience with them.
>>
I've been following the FreeCodeCamp Frontend course for a few months and I've almost finished. I have a portfolio of about 6 projects (stuff like a pomodoro timer, tic-tac-toe & simon game, wikipedia and twitch viewer using an api, etc).

Is this enough to start looking for a job? I don't feel completely confident in my JS abilities yet, in fact I still feel really new to it all, but I've read about people finding jobs at this point. Should I start applying or wait a bit till my skills are more polished?
>>
I write my Python code in Notepad++.
This does not seem ideal for web dev in general.


What's /g/'s favored text-editor?
>>
>>56454881
Atom or Sublime.

If you're a huge edgelord, get Vim or Emacs.
>>
File: Selection_050.png (86KB, 1921x962px) Image search: [Google]
Selection_050.png
86KB, 1921x962px
>>56454881
there are 2 options anon, sublime or vim
atom is nice, nice looking only.
>>
>>56450425
PHP is as much of a cluster fuck as JavaScript but with none of the extra features. It is a relic of when there were no templateing packages i.e. jinja2.

JavaScript is a horrible language and could turn you off to coding. However it is very necessary.

I would do some light basic JavaScript, learn loops, event listeners, some basics. Then transition into jQuery so you know what your jQuery is doing.

Only do something faggy like Angular or a JS framework if you plan on only ever being a "front end developer".

From a learning and functionality stand point, Python with Django or Flask is master race. Ruby on Rails and some Java Frameworks like Ninja are kind of second class citizens.

For wage cucking PHP is king because everyone who can wipe their own ass can write some PHP so massive amounts of the internet are written in PHP.

After that RoR and "Mean Stack" tend to get you jobs very fast.

Python depends on where you live. If there is a shop that uses it near you, you'll almost be auto-hired, if not then no one will know what the fuck or why the fuck you are doing it.


ASP.NET, not even Once
>>
I have some divs centered in a flexbox. One div contains numbers which change and mess up the divs alignment. This is an example: https://codepen.io/anon/pen/ozgRZj
I cannot change font (Times New Roman surprisingly doesn't have this problem) and i cannot set a fixed width because i don't know how much large the div will get, and it also messes up the correct center. How can i fix this?
>>
>>56455397
>JavaScript is a horrible language and could turn you off to coding. However it is very necessary.

When I first saw JavaScript I felt like vomiting. So much clusterfuck... I felt stupid and bored as fuck learning it for at least a month. Now it looks much clearer to me, and I can appreciate how many things you can do with it. It's fun to code in JS.

So if you can get past the initial hump of JS that is "holy fuck what the fuck is this mess" you'll be fine.
>>
File: disgusting.png (216KB, 504x529px) Image search: [Google]
disgusting.png
216KB, 504x529px
>>56455157
> sublime
>>
>>56455464
Agreed. It's fun if you've been doing it a few years, or if you are coming from something like C programing.

JavaScript for all it's flaws does what it does very well. It is a very tiny, light weight, low feature language that is meant to run in a browser without slowing the browser down.

That's not to say people can't write JavaScript that will make a browser cry, but when used responsibly it add must-have magic to a website.
>>
>>56454881
I've been using VSCode a lot recently. It's extra comfy with the python extension.
>>
>>56455575
what do you have against sublime?
>>
>>56455575
Sublime is God Tier, Atom is Shit Tier, get over it. VIM is the master race. EMACS users just need to go to rehab.
>>
>>56455157
that looks ugly.
>>
>>56455157
Oh baby please let me sql inject you
>>
>>56455793
but how :(((

user cant run any query, that $_GET will only call video from folder, not db :(((
>>
hey guys is there an editor that lets you generate code with multiple classes automatically ?
>>
File: 04HfT17.gif (640KB, 360x360px) Image search: [Google]
04HfT17.gif
640KB, 360x360px
Friend of mine is shooting a webseries and needs a site for it.

Anyone seen a good example of this? I've got a rough idea of how it should look but it'd be great to see some others to get an idea of anything I might be missing.
>>
>>56440158
Hey guys, I need some help.

So I'm working on a little WebApp
https://www.lita.engineering/experiments/dasf/viewRoute?./lists/1472866119.json

I keep getting told I'm over the query limit

but my quota thing: http://i.imgur.com/Ilj7hj6.png
seems to indicate that I should be alright

Does anyone know why I might be maxing out my quotas when i'm only trying to geocode 17 things at a time?

If any of you pro GoogleApp developers can help me out, it would be greatly appreciated

(This app is for the Denton Animal Support Foundation, to help drivers with their route for passing out flyers) (I'm not making any money from this, i'm doing it for free)
>>
>>56455606
> 2.02 is okay, but outdated af
> 3.0 is broken
Atom all day.
>>
Alright /g/, how should I store and retrieve password using php and mysql? please post examples.
>>
>>56457945
use password_hash() to hash them and store the result in the database
that's literally it
>>
>>56447167
$mamitagacitababita = sql_connectumundo ($usero_nameo, $passa_wordo, $dadaddadabasea);
>>
Is bluefish nice?
Currently using emacs but was looking for something neater
>>
>>56458053
Npp is better than any other free notepad.
Better plugins, better everthang.
Fuck Bluefish.
>>
>>56457958
>RAINBOW TABLES
>>
Who do you guys buy domains from? Is there a best service for this?
>>
>>56458223
password_hash() handles salting automatically so rainbow tables are irrelevant
>>
>>56458223
Can you even use password_hash without a salt? Also good luck generating a rainbow table for different costs, I hope you have a couple of parallel universes to compute and store all these passwords.
>>
>>56455157
Please use an ORM. They're not bloated, it's a meme.
>>
>>56458328
Not him, but they are for certain things.

Still, not using an ORM is premature optimization as far as I'm concerned. 95% of the time, ORM won't be your bottleneck.
>>
>started reading up laravel documentation
>gave up roughly 5 seconds after and moved back to symfony
>>
File: wew lad.png (105KB, 1314x546px) Image search: [Google]
wew lad.png
105KB, 1314x546px
>>56457958
>>56458223
>>56458282
>>56458291
is this okay?
> first function hashes password (to be later stored in database)
> next function checks the hashed password with the unhashed pass
Is it really necessary to add salt? how crackable it the PASSWORD_DEFAULT stuff?

> pic related
>>
>>56458762
>not programming in English
Fuck off, I aint checking your shit.
>>
>>56458762
yes, also write in english you autist

btw you can just do
return password_verify($senha, $senhaCriptografada);

in the second function
>>
So at work, we'd finally almost worked up the courage to upgrade to Bootstrap 3.

>https://github.com/twbs/bootstrap/issues/20631
>Stop all work on v3—today. The open issues, split dev setup, and more holds us back from focusing entirely on v4. I'll close all remaining v3 issues and milestones. Any new changes to v3 will be sporadic and highly irregular.

For fucks sake...
>>
>>56458785
lmao thanks, not sure how I didn't realize that.

>>56458782
wew lad
>>
>>56458762
>Is it really necessary to add salt?
Yes, salts are necessary, but the password_hash wrapper is doing it for you.
In PHP7, it's even deprecated to give your own salt. Let the function do it for you, it's more secure.

>how crackable it the PASSWORD_DEFAULT stuff?
PASSWORD_DEFAULT gives you (one of) the best hashing algorithm available. Right now, the function is using bcrypt. But if a better algorithm comes later, PHP will use that one by default, that's why you'd better stick to the PASSWORD_DEFAULT constant.

It's technically not uncrackable, but it will take a very, very, very long time for an attacker to simply get one password.
>>
>using CSS frameworks

It's CSS, anybody who can't write CSS without a bloated framework shouldn't be doing webdev.
>>
>>56445828

Angular 2 is DOA, don't bother with it
>>
>>56459584
Who are you quoting?
>>
>>56459584
Good luck making it look good across devices and browsers if you're making anything more then a blog
>>
How the hell can I listen to events using OoB and MVC?
>>
>>56459143
thanks anon! Another question: Where is the encryption key?
>>
>>56458490
That's me with basically every framework.
>>
>>56458089
But I'm on Linux
Is it worth it using with wine?
>>
>>56459633
I really dislike Typescript...not sure why they wanted to do that...
>>
>>56460800
Everyone serious JS programmer uses either Typescript or Coffeescript, though.
>>
Who holds all the logic in the MVC pattern? Controller or model? Like in some todo app, is the model responsible not only for the individual todos objects but also needs to have its own methods for deleting, updating and creating new ones? Or is that job of the controller? Or does the controller just calls those methods but they're still inside the model?
>>
>>56460892
>The model represents the data, and does nothing else. The model does NOT depend on the controller or the view.
>http://www.tomdalling.com/blog/software-design/model-view-controller-explained/
>>
>>56460815
Hm, well my peers all say coffeescript is dying/dead. If you look at its release schedule it hasn't had a new release in over a year now...

As for typescript...its essentially a preprocessor
>>
File: C#.png (14KB, 574x430px) Image search: [Google]
C#.png
14KB, 574x430px
Could use some C# help.

I have a list of objects with a suite and value property. (I'm writing a poker app). I'm trying to access the suite property but can't.

I'm familiar how in JavaScript I can just do cards[0].suite, but I'm not getting that property. I'd also love some critique on my code as I'm new to C#. Thanks!


  public class card
{
public string value { get; set; }
public string suite { get; set; }
}


class Program
{

static void Main(string[] args)
{


var deck = getDeck();

// Trying to get suite. ie deck[0].suite

Console.ReadKey();



}

static List<object> getDeck(bool shuffled = true)
{
List<object> cards = new List<object>();

string[] suits = new string[4] { "", "", "", "" };
string[] faceCards = new string[4] { "J", "Q", "K", "A" };

foreach (var i in suits)
{
for (var j = 1; j < 10; j++)
{
card c = new card();

c.suite = i;
c.value = (j + 1).ToString();

cards.Add(c);
}

foreach (var f in faceCards)
{
card c = new card();
c.suite = i;
c.value = f;

cards.Add(c);
}
}

if (shuffled)
{
Random rng = new Random();
var count = cards.Count;

while (count > 1)
{
count--;
int k = rng.Next(count + 1);
var value = cards[k];
cards[k] = cards[count];
cards[count] = value;
}

}


return cards;
}
}
>>
>>56440158
how would I go about bypassing the captcha on this website?
https://vinrcl.safercar.gov/vin/vinLookup
>>
>>56455397
Yes JavaScript is necessary.

About backend languages, python is used only by fairly small businesses, usually relatively local, and those sites really aren't equipped to handle a lot of users. Similar but less so with PHP, since it's managed to get fast with FPM or HHVM.

If we're talking about hiring, C# and Java are still the way to go since a lot of businesses, even small businesses with ambitions, won't risk it and will just go for high speed languages. There's been some push for rust and Go, but like PHP there's a lot of Java and C# out there so there's a little stagnation.

>>56461850
For why are you posting in the /wdg/?

Also, if your data structure is defined as List<object> you're going to need to cast every time you take something out of it. That's the rules for data structures filled with generics.
>>
>>56461850
C# is a statically typed language, meaning that the things you can do with values (e.g. call methods, access variables) are determined at compile time. You are trying to access the "suite" property of a value of type "object", which the compiler rightly refuses to accept as valid. Have you tried defining the list as List<card> instead?
>>
>>56462005
>Have you tried defining the list as List<card> instead

That fixed it! Thanks ^__^
>>
>>56462005
Nothing wrong with List<object>, he just needed extra code.

>>56462039
Where did you get the idea to have a data structure of generics (aka object)?
>>
>>56462050
I'm new to C#, didn't even consider using card as my list type. It seems very obvious in hindsight
>>
>>56462039
No problem :) Just make sure you understand why this fixes it. I suggest you read up on basic type theory (static vs dynamic, strong vs weak manifest vs inferred) if you're planning on using more statically typed languages such as C# or Java.
>>
>>56462074
Cool, will do. Thanks for the advice
>>
>>56462050
It is wrong. Using List<object> is overly generic for a method that can only ever return List<card>. Defeats the purpose of type safety.
>>
>>56461860
>bypassing the captcha
not possible anon, it also runs on the server side.
>>
>>56462050
>Where did you get the idea to have a data structure of generics (aka object)?

object has nothing to do with generics. Generics are used types are passed as parameters. List<T> is the generic type, and List<object> or List<card> are specific instances of that type. There's nothing special about object in this case.
>>
>>56462126
Actually the function is defined to return an object list. There's no actual real issue of type safety if he casted.. or just changed the data structure type.

>>56462161
I think you kind of know what I mean, anything can be cast to and from an object, it's useful if you want your data structure to hold multiple types. It's strange a noob would get this idea, I've only done it to simplify serialisation.
>>
>>56455157
> ugly af text editor
> sql injection ready
kill you're self.
>>
>>56440193
I don't know what this is
>>
I have a simple website built using bootstrap. On the front page there are two nav pills (functionally equivalent to tabs). The default contains a "submit" form, and the other contains a "search" form.

I am using PHP to handle form submission and interaction with SQL. I want to use PHP to validate form submissions. This is easy for the default "submit" form, but when I try to validate the "search" form, it always shows the "submit" form.

So is there any simple way to load my index page with the non-default "search" pill toggled? Sorry if this explanation is a mess.
>>
>>56460159
What is oob?
>>
>>56462129
is there a way to somehow get the captcha and the search box into my website?
>>
>>56460892
Controller calls delete on model.
>>
File: 1323595549415.jpg (34KB, 250x333px) Image search: [Google]
1323595549415.jpg
34KB, 250x333px
So what are the alternatives to PHP?

Everyone shits on PHP, but Python looks like an equally shitty language to do back-end stuff with.
>>
>>56461968
>python is used only by fairly small businesses, usually relatively local, and those sites really aren't equipped to handle a lot of users. Similar but less so with PHP, since it's managed to get fast with FPM or HHVM.

This is pure unadulterated bull shit. Linkein, Pintrest and Google all run off Python. The only major company that runs off PHP is Facebook and even then its not ACTUAL PHP it's a PHP rebuild called "Hack", because PHP can't scale for shit.

Python, Java and Scala are the only web languages that are able to fully scale gracefully.

C# can't scale horizontally for shit, and even with vertical scaling MicroShaft's shity servers can't handle websockets because MicroShaft can't handle open standards.

>If we're talking about hiring, C# and Java are still the way to go since a lot of businesses

While this is not 100% pure bull shit, it is bad advice for anyone who doesn't have a CS degree. The only reason major companies hire tons of Java people is because all universities teach some Java. C# is in the same boat only you're going to be expected to have learned Java in University and then picked up C# after. Don't learn Java or C# for web dev even if you have a CS degree, only the worst wage cuck outlets hire these people.

PHP can be a wage cuck language, just as any can be, but it is far less of one considering how many jobs you can freelance with it. Same goes for Python and Ruby on Rails. However, if you've used any Python framework or RoR, it's going to be really had for you to tolerate working in PHP.
>>
>>56464233
>Python looks
If you actually use it you will see Python's advantages. It is not an exiting language with a bunch of cool and novel features but it has almost none of the "WTF factor" of PHP.

Alternatives include Ruby (Rails, Sinatra), Groovy (Grails), Elixir (Phoenix), JavaScript (Node.js and its myriad frameworks), C# (ASP.NET 5 MVC), Java 8 (DropWizard, Ninja) and Scala (Play!).

If you've only worked with PHP, Ruby will likely be more fun for you than Python, at least for a while.
>>
>>56464290
>C# can't scale horizontally for shit, and even with vertical scaling...
http://highscalability.com/blog/2014/7/21/stackoverflow-update-560m-pageviews-a-month-25-servers-and-i.html

>Python, Java and Scala are the only web languages that are able to fully scale gracefully.
That's a misleading way to put it. For scaling, architecture > VM/compiler > language itself. Why? Beyond a certain point large web applications like Facebook can only scale horizontally, which is when the inherent qualities of your language and VM start to matter much less than the right architecture and having the libraries/frameworks to support it. The VM only has to be "good enough". Java and Scala typically run on HotSpot, which is a very impressive VM with a world-class JIT and GC; Python, on the other hand, has a mediocre interpreter with a GIL, so it can't even fully leverage OS threads. Both, however, scale horizontally with a shared-nothing architecture, and so does PHP. Facebook made HHVM (Hack came later) to make the most out of each CPU core they owned but it is something they could have done without; an architecture that enabled horizontal scaling, not so much.
>>
File: image.jpg (46KB, 381x499px) Image search: [Google]
image.jpg
46KB, 381x499px
I know HTML5, CSS and Ruby.

Is pic related a good source to continue my learning in web dev?
>>
>>56464950
I'd say depending if you want a frontend focus or a backend focus you should

practice more javascript (you should already know js)

learn PHP/Python/whatever and a SQL relational database

respectively

don't sweat about whether people believe that your chosen language is shitty or not, what is important is that you learn how to solve the most common types of problems that you run into when building web applications.
>>
Anyone using Modx? What do you think of it?
>>
>>56464950
>>56465017

I'm not an expert, but my next step lately has been learning the essentials of backend development. You don't necessarily have to be a full-stack developer, but you most certainly will have to be able to "talk" to your backend.

I just read a pdf of pic related a practiced making some relational databases using SQLite, but really you should just learn the general philosophy of relational databases (tables, primary and foreign keys, 1-to-many vs many-to-many relationships, etc.). Probably don't need to sweat the implementation too much.

After learning the traditional relational databases, it's given me some good perspective while learning some of the upcoming databases and why they are becoming popular, particularly Mongo, which is incredibly easy to implement and use considering it is basically Javascript. Even if you never work with a traditional relational database it is still good knowledge to have.

Once you understand a full "stack" you can get a good picture of what different implementations are popular. E.g. Apache/PHP/MySQL/Javascript vs. Mongo/random Javascript trash/Angular,React,etc.
>>
>>56440260
Sounds like my story as well.

I landed an internship at a software house as a full-stack developer as well, but I'm still in high-school and I live in a shit-hole.

My pay is like 3.5€ an hour. I reckon you could make more in the States blowing bums in NY. I'm not worried about that, though. I just want to get my work experience and my degree and bail on this shit-hole for good.

Do you guys have any idea how much I could possibly make with a degree in Software Engineering and 4~ years of work experience?

I'm working part-time, by the way. I work full-time during my time off from school. I spent the last three months working full-time. They actually asked my school if I could stay over there full-time during my class-time, but they denied it, so I have to go through getting my HS shit in check and getting my work done properly. It's going to be a rough fucking year, I imagine. Especially considering it's my last year of high-school and there'll be a slew of exams ahead of me, but fuck it. If I endure this, I can boast about it in my CV, for whatever it's worth.

We also work a lot with ASP.NET MVC, but we're starting to migrate to ASP.NET Core MVC.
>>
>>56448259
>If you sanitize inputs by stripping all non alphanumeric characters with regex, you'll be fine

Please don't tell me you believe this.
>>
>>56464233
Erlang
>>
>>56465607

Then tell us what should we believe.
>>
>>56465625
It's impossible to ever "sanitize input". What you want to do is prevent malformed data from ever being executed as SQL by parameterising your input.

I believe the format goes something like

<?php
$stmt = $dbh->prepare("INSERT INTO BUTT (dongs, butts) VALUES (?, ?)");
$stmt->bindParam(1, $dongs);
$stmt->bindParam(2, $butts);
?>


If I remember rightly there's also something called PDO that makes it much easier, but it's been a long time since I've ever had to do anything with PHP.
>>
>>56465746
Get with the times brother.

msqli_escapestring_v4_actuallwormstgistime_v7_imnotkidding_v3()
>>
class TeamOne extends Component {


constructor(){
super();
this.state = {
team_1: "Loading..."
};
}

componentDidMount(){
const teamOneRef = firebase.database().ref().child('team_1');
teamOneRef.on('value', snap => {
this.setState({
team_1: snap.val(),
});
});
}

_addByOne(){
var team_1 = this.state.team_1;

const dbRef = firebase.database().ref();
const sessionRef = dbRef.update({team_1: team_1 + 1});
}

render() {
return (
<div className="col-md-4 team-wrap">
<img src={harry} role="presentation" className="team-img"/>
<h1>Harry</h1>
<h2>{this.state.team_1}</h2>
<button onClick={this._addByOne} className="btn btn-primary btn-block"> +1 </button>
<button className="btn btn-primary btn-block"> +5 </button>
<button className="btn btn-primary btn-block"> +10 </button>
<button className="btn btn-primary btn-block"> -1 </button>
<button className="btn btn-primary btn-block"> -5 </button>
<button className="btn btn-primary btn-block"> -10 </button>
</div>
);
}
}


Whenever I try to access the current state of team_1 using it says that's undefined. How to get the value held within the h2 tag? I want to make sure it's in sync with the value held in the database so i can increment it by 1.
>>
>>56466357
it's in reactjs btw
>>
Opinions on Silverstripe?
>>
GitHub or BitBucket?
I need private repo but i dont want to pay 7$ to github :(
>>
>>56464767

Good post.

I'd just like to add, not every Language/VM scales the same. Facebook scaled Rails at the maximum and found out there's a certain point where it's just not worth it anymore.

Think about this: You have five servers that get problems as soon as they work 70%. But when the first server shuts down, the other ones have to carry the additional load. So unless you want a domino effect, you have to keep the servers at 50% and have a enough servers as backup to prevent this scenario.

Dont get me wrong, Rails is not a bad framework, it's just not suited for that level of scalability. If you take something like Erlang you can scale it easily until the level of WhatApp, plus you can hot-load code (change running code) easily.

So yes, the langauge is important when you enter a certain level of scalability.


>>56464950

Ruby and PHP are mutually exclusive.
It's not wrong to learn both, but.. why?

I'd suggest get a minimal stack running, wether it's MEAN, Django, RoR or some PHP framework (take something like Laravel, not something like Wordpress).

You will learn a lot of stuff simply by trying to make things work.. How does routing and Ajax work? What is REST, SOAP...? You will learn this with any framework. You can even build a HTML site and gradually work your way up with JavaScript functions, JQuery, Bootstrap, React, Angular, Ember... This is a graet way to learn, even though you will more mistakes than having a framework that "has your back", i.e. when it comes to security stuff.

But in the end it's more impotant to focus on a working product and learning the than to learn "the best stack". An expericed Django develloper can easily switch to Rails and vice versa. So don't think too much, just code and try to learn from others. Check out best practices, tutorials and code snippets for your preferred stack, wether be it Laravel or a simple LAMP stack. Just get coding asap.
>>
>>56464767
>For scaling, architecture > VM/compiler > language itself. Why? Beyond a certain point large web applications like Facebook can only scale horizontally, which is when the inherent qualities of your language and VM start to matter much less than the right architecture and having the libraries/frameworks to support it. The VM only has to be "good enough"

This is misleading in that it represents scaling as simply a string of independent virtual machines running in a data center, and not the need to tie vast amounts of data together.

This requires things like NOSQL database, database sharing and a language that can handle it.
>>
github alternative for private repos?
What would you suggest me anons?
>>
Lads, went for a junior front end dev interview on Monday, they're supposed to call me later this week to possibly schedule a second technical interview. They didn't tell me details on what it would be exactly.

Was just wondering if anyone has done a front end dev technical interview and what that entails? I've already done some Googling and the stuff I got was just pretty basic JavaScript questions asking what will this evaluate to etc.
>>
My dad (very good business man) says there's no money in website building...i-is he right?
>>
>>56466554
Yes and no.
>>
>>56466562
can you please elaborate?
>>
>>56466554
Your dad's a boomer. He doesn't know shit about web.
>>
>>56443141
MVC is the name of the Web framework. Ironic how it is used for anything but MVC though
>>
>>56466554
>website building
We have pajeets for that son. App dev and enterprise development is where the jobs are
>>
>>56466530
bitbucket
>>
>>56466533
>what is a closure
>how to es5 class
>what is the difference between apply, call and bind
>what does responsive mean
>what css preprocessors have you uses
Etc
>>
>>56466530
>>56466741
This
>>
>>56466741
>>56466750
thanks, i was thinking about it.
I registered there few years ago but never used it
>>
>>56466515
How can a language be unable to handle NoSQL or database sharing?
>>
>>56466744

Really?
I have very limited knowledge about Web Design and can easily answer those (OK, I haven't used SASS or LESS yet).

Is FrontendDev really so easy? I'd expect more knowledge about design: colors, fonts, knowledge in PS or GIMP, experience with different layouts and so on.

Also some knowledge of common Framework like JQuery, Bootstrap, React or Angular. Or at least decent JS skills..
>>
>>56466744
>css preprocessors
I really, really hate "web dev".
>>
>>56466847

>If a C program replaces Macros with actual code it's preprocessing
>If CSS Macros get replaced with CSS code it's not preprocessing

Faggot.
>>
>>56465590
>shit-hole
>€
Does not compute.
>>
>>56466920
Eastern Europe. Think Lithuania
>>
>>56466792
NoSQL databases, sharded databases, and various other database systems can handle threading, but PHP and server side JavaScript shit themselves with threading and thread safety.

This makes PHP a shit language, it makes Ruby a second class language.

And Python / Java at the God tier.
>>
>>56466836
Depends on the company. I've worked in places where the front end dev does literally the front end, but most places seem to regard front end developers as useless twats who can barely cope with back end languages or UX so a designer hands them a design and the front end dev implements the CSS/JS/HTML, consuming back end services to make it a Web app.

Yes knowledge of common frameworks is a question that may come up but if you get asked anything about jquery the company probably falls under the latter and you should probably look somewhere else
>>
I personally feel that PHP is vastly superior to the many java script frameworks and libraries.after trying out angular and other shit I settled on trying to use meteor with react for an actual project... and it's shit.

Give me one good reason I should keep trying to use this inferior language.
>>
>>56466954
Nodejs is a single threaded, evented language, which actually makes it pretty good for database front ends. Golang is God tier, and Java is fucking horse shit
>>
>>56466990
Javascript for anything involving server calls is absolute AIDS. Your instincts aren't wrong.
>>
>>56466990
Unless you need a rich, interactive front end (which you have to use JavaScript for) you should build the whole site static instead of being a massive faggot
>>
>>56466464
Then bitbucket.
>>
>>56466954
Threads are mighty useful, but when it comes to database access in particular, separate processes are not much worse than threads.
>Python / Java
Do you mean CPython? If so, quick, tell me what's wrong with equating them like that.
>>
>>56467011
If you can't grapple a simple ajax call you should probably just give up now
>>
File: meteor.png (55KB, 881x636px) Image search: [Google]
meteor.png
55KB, 881x636px
lol
>>
>>56467067
What am I looking at?
>>
>>56466954

>Ruby a second class language.
>And Python / Java at the God tier.

Excuse me, but Ruby and Python both have a GIL with Ruby being a little faster than Python.

Ruby != Rails, there's a lot of nice frameworks out there. And only an idiot would use Rails for smaller projects, when there's stuff like Sinatra or the ten miliion other Ruby frameworks..

Rails is perfectly suited for SOME problems, but as every Framework it's just a tool. when you have a hammer, every problem looks like a nail.
>>
>>56467120
Piles of endless Javashit
>>
>>56466720
>App dev and enterprise development
I'm very noob, what do you mean by that?
App dev as in android apps?
>>
>>56460430
>But if a better algorithm comes later

If it was "encrypted" with a key it would be a shitty way to store a password.

It's a one way hash. There are already plans to upgrade this function to the much stronger Argon2i in newer PHPs.
>>
>>56443141
Things can be even simpler now.
Models<->Controllers<->JsonApi<->Reducers<->VirtualDom
>>
>>56467243
Not same anon but I wrote my own basic MVC framework to get a better understanding of how things work. I wrote this for my password hashing library. How is it?

I did this before PHP7.
>>
File: Screenshot_20160907-132931.png (450KB, 2560x1440px) Image search: [Google]
Screenshot_20160907-132931.png
450KB, 2560x1440px
>>56467243
>>56467327
Forgot pic.
>>
>>56467327

If you "encrypt" such that you can reverse it with a key, you're assuming that the key cannot be compromised. If this was a safe assumption, you could equally suggest the database will not be compromised.

Password hashes need to be irreversible.
>>
Gonna make myself a new portfolio. What are some inspiring portfolios you guys have come across? Or any tips in general.
>>
>>56467340
>>56467354

That's pretty much password_hash, which is reasonable, but you can't call it "encrypt".
>>
>>56466357
Probably the value of snap.val() is undefined.
Anyway.
I'd get your firebase stuff out of your view layer and interacting with something like redux.
Otherwise you'll need to unlisten any listeners you bind in componentDidMount.
>>
>>56466530
gitlab is pretty good these days
>>
>>56466554
Basic sites are best handled by services like squarespace. But you can make $ if developing something custom, for which there is no off-the-shelf solution. Just need to find the right clients and figure out their needs.
>>
>>56466530
http://fossil-scm.org/
>>
>>56467152
Ruby can't thread for shit, also there is nothing like numpy or scipi. It's a web language. It's not a bad web language, but it's not world class like Python.

I am not trying to say it's 3rd world like PHP
>>
>>56468923
>>56466954
You sound like an underinformed buzzword gobbler, frankly.
>>
>>56468981
While I agree with you about the anon in question, it's hard to deny that Ruby is fucking slow.
>>
anyone here using google analytics? I am getting an error for real-time reports since yesterday and I am not sure if its just me
>>
>>56469042
>it's hard to deny that Ruby is fucking slow.
Oh yes, I am not one to deny that. It's just that it really isn't the case that "Ruby can't thread for shit" in some unique way. Ruby has a GIL a lot like Python's. Actually, Ruby is sort of better off in this department because of JRuby. It does take forever to start but it is actually quite a bit faster (up to 3x or so) and uniquely GIL-less while PyPy still has a GIL.
>>
>>56469149
Works for meâ„¢
>>
Most secure way of uploading files to server with php?
any suggestions?
>>
>>56469401
Define secure. Secure for you? Secure for the server? For the user's anonymity?
>>
>>56469498
Secure for the server.
explained:
If want to enable upload for gif/webms, i dont wont them to find way to upload some shell.php shit
>>
>>56469401
WinSCP is comfy
>>
>>56469521
These guys know a lot about PHP and its security flaws.
>https://paragonie.com/blog/2015/10/how-securely-allow-users-upload-files
>>
>>56469527
ill try to unseen this

>>56469555
thanks
>>
I'm about to apply for some junior dev jobs (few years sysadmin experience few years html / javascript experience) and I don't have a portfolio website up right now.

Any examples of some not so crazy portfolios? I noticed most use parallax, I'm not too fond of that look but it'll will probably go over well with a prospective agency. Any input?

Thanks for your help, trying to move out of linux administration and into web development.
>>
>>56453522
who is that??
>>
>tfw have to renew shitty lease because no web dev job.

It's happening this year.
>>
>>56466554
Small business has been on the rise for a while. There is an endless sea of people looking for websites.
>>
is there a program that takes a page and converts its images to data-uris? can wget/curl do this?
>>
>>56466954
>And Python / Java at the God tier.
you mean golang
>>
>>56468923

>Ruby can't thread

Of course Ruby has threads. It also has fibers, which are special threads.

count = 0
a = Thread.new { loop { count += 1 } }
sleep(0.1)
Thread.kill(a)


>nothing like numpy or scipi.

There is SciRuby. But why bothering with it, when you can call C code for computation?
require "inline"
class MyTest
inline do |builder|
builder.c "
long factorial(int max) {
int i=max, result=1;
while (i >= 2) { result *= i--; }
return result;
}"
end
end

p MyTest.new.factorial 5



Or call Assembly from Ruby?
require "inline"

class Ruby_to_C_to_Assembly
inline do |builder|
builder.c \
'int add(int v1, int v2)
{
__asm__ __volatile__("addl %%ebx,%%eax"
:"=a"(v1)
:"a"(v1), "b"(v2)
);
return v1;
}'
end
end

puts Ruby_to_C_to_Assembly.new.add(17, 4)


>It's a web language

It's perfect for all kind of scripting.

require 'crypt/blowfish'

filename = ARGV[0].chomp
puts "Decrypting #{filename}."
p = "Decrypted_#{filename}"

print 'Enter encryption key: '
kee = gets.chomp

begin
#initialize decryption method
blowfish = Crypt::Blowfish.new(kee)
blowfish.decrypt_file(filename.to_str, p)
#decrypt file
puts 'SUCCESS!'
rescue Exception => e
puts "An error occurred: \n #{e}."
end


Create thumbnails:
require 'RMagick'
include Magick

# JPG, JPEG, jpg, and jpeg
Dir['*.[Jj][Pp]*[Gg]'].each do |pic|
image = Image.read(pic)[0]
next if pic =~ /^th_/
puts "Scaling down 10%"
thumbnail = image.scale(0.10)
if File.exists?("th_#{pic}")
puts "Could not write file, thumbnail already exists."
next
end
#Write to a seperate folder if you wish to get organized, or sort by filename
thumbnail.write "th_#{pic}"
end


Also Ruby is faster than Python.
>>
>>56464233
Flask is nice

https://github.com/Nicci00/shijou.moe/blob/master/app.py
>>
>>56470612
>Ruby is faster than Python
As if that means anything
>>
File: 1472604467693.png (230KB, 447x360px) Image search: [Google]
1472604467693.png
230KB, 447x360px
>>56470982

>not running at machine code speed

You plebs and your language-oriented programming languages.
>>
Any recommended Typescript tutorials?
>>
>>56460957
I've seen a lot of videos and articles say something else. Models are in charge of business logic, methods and data. What the controller does is call those methods and then tell the view to re-render itself on every change.
>>
i'm learning webdev for fun, just got done with a nodejs course where i learned node and express and mongo

but i have no idea how to create a front end to interact with nodejs

is this where i learn angularjs?
>>
>>56475690
You were already interacting with the front end all along. The things that get rendered in the browser is the view and front end
>>
>>56474812
JavaScript:
// importing files
var someBullshit = require('some-bullshit');

// functions
function square(num) {
var squaredNum = num * num;
return squaredNum;
}

// callbacks
someBullshit(function(paramOne, paramTwo) {

});


TypeScript:
// importing files
import SomeBullshit from 'some-bullshit';

// functions
function square(num: number): number {
let squaredNum: number = num * num;
return squaredNum;
}

// callbacks
SomeBullshit((paramOne, paramTwo) => {

});

TS is literally just es6 with data types.
>>
>>56470095
welp, since I couldn't find one, I made it myself: >>56477872
>>
>>56470635
c-cute
>>
>>56440872
funny how everyone on 4chan claims to earn such high starting salaries.
That angular dude is probably the only one here with a real job, and this guy is a NEET
>>
in express, i'm connecting to my tutorial database using a plain string like mongodb://username:password@someAddress. the instructor in the course i've followed points out that this is a terrible idea but doesn't bother to explain what to do about it.

what do i do about it? how exactly do i encrypt that string? help?
>>
>>56458047
>>56447167
dont use mysqli, use PDO instead.
>>
>>56478290
post video?
>>
>>56478290
Usually you set environmental variables with sensitive information like that.
>>
>>56476952
Should I learn es6 instead then? That Typescript snippet you posted doesn't really make sense to me.
>>
>>56478469
well, a different course i watched mentioned that i'd have something like process.env.SECRET and somehow use that to encrypt things but, how?
>>
Just remembered switch is a thing. Goodbye conditionals tree.
>>
>>56478619

>Should I learn es6 instead then?

If you want to know JavaScript, yes.

// importing files
import someBullshit from 'some-bullshit';

// functions
let square = num => num * num;

// callbacks
let callback = (paramOne, paramTwo) => true


Clean af.
>>
>>56478916

You have environment variables.

You can export them from your Bash profile, or export them explicitly on a remote server.
>>
>>56478916
Encrypting is a meme. You aren't going to encrypt database info on your server cause then it won't work on reboot. You just don't want them in your sourcecode/git.
>>
>>56479423

Unless you're dealing with extremely sensitive information, I agree.
>>
>>56478619
Did you understand the JS snippet? My point was that there aren't really a whole lot of differences between the two languages.

Anyway, the documentation on the TS website is brety gud:
https://www.typescriptlang.org/docs/tutorial.html

Also, yes, definitely learn es6 because react.js will kick your ass without it.
>>
>>56479597
Are datatypes optional or required??
>>
>>56479597
Thanks for the link, I'll check it out. I'm more into backend right now, and I know vanilla JS well enough. I'll get into ES6 first.
>>
What's the current hot meme stack for pure JS devs?

Turns out JS and Python are the top 2 paying skills in UK, even over C# and Java, and I've done Django + bits of JS commercially for a long time, but would like to cover my JS base a bit more, in case it turns out Python salary starts peaking.
>>
>>56479996
I think they're optional, and to be brutally honest you won't need them for like 90% of web apps. They're mainly useful when working on some massive project with thousands of lines of code and it becomes increasingly difficult to remember which parameters of a given function should accept what types of data and shit like that.
>>
>>56481087
MEAN stack was, is and will be the meme stack of choice for pure JS applications, at least for a while.
>>
>>56481236
>MongoDB
My only complaint. Thought itjobswatch says even MySQL is more popular in job listings, so I'll just stick to that. Weird that postgres isnt up there even though it can do some NoSQL stuff
>>
>>56453522
holy fug, she got dem thicc hips
>>
>>56481504
i wanna fuk a chubby
>>
File: asdasd.png (6KB, 541x73px) Image search: [Google]
asdasd.png
6KB, 541x73px
Forever 6%
>>
>>56482159
>Stalled
>>
>>56482591
It's the only one I've found so far.
>>
>>56475690
>>56475930
>but i have no idea how to create a front end to interact with nodejs

Yeah I can understand angular/ionic/cordova, I can understand node and express with ejs templates. But how do combine these? Is there some standard practice? I couldn't find much besides that most people just use angular and parse json retrieved from the server. I like express because I can relate it to php.

Should I have my angular html templates load the express ejs templates? Or should the ejs templates load the angular templates? Both I guess? I currently have routing handled by express and all the other scripts work fine, I don't see what I would gain (or even how) by implementing angular modules into the mix.

Also should I do anything or worry about SEO if I have a page that is entirely rendered by javascript? I use query items, ?page=blah, and the like for navigating/determining which express items to fetch.
>>
>>56483872
Watch any MEAN stack tutorial. They tell you how to combine angular with Express
>>
>>56483908
Thanks anon, sometimes it's just about knowing what keyword to use.

>>56478916
>well, a different course i watched mentioned that i'd have something like process.env.SECRET and somehow use that to encrypt things but, how?

It's not that your encrypting anything it just obscures the info out of the actual js file and onto the server shell (bash). If someone got shell access you'd be boned anyways. I'm not sure how this would work in node, but you'd define it in your .bash_rc or .bash_profile as export PASS="secret". From the shell you could "echo $PASS" and it would print "secret". There's got to be some way node can also access $PASS.
>>
File: qweqwdqwe.jpg (12KB, 730x34px) Image search: [Google]
qweqwdqwe.jpg
12KB, 730x34px
can people somehow get to the backend code if it's on a secure server? because if they can't, how would they ever get this string?

also, i just learned everything i ever wanted to know about nodejs and authentification by watching this video https://www.youtube.com/watch?v=yvviEA1pOXw so now i can safely store peoples info i suppose
>>
>>56484972
they cannot
but you should still use a config file and store each value (host, port, username, password, etc) separately because it's good practice
>>
File: YbRC7np.png (795KB, 2880x1800px) Image search: [Google]
YbRC7np.png
795KB, 2880x1800px
why is tmux so comfy?
>>
>tfw writing everything from scratch

It's like camping without a tent but you're building your own shelter and it's actually much nicer than the tent you would have used, but watch out for leaks when it rains...
>>
>>56485253
Woah that's a nifty project
>>
I've only been learning and playing with HTML/CSS for a week, and I've been using Notepad++. Is this a good option, or is there more benefit in finding something that gives a live preview as I mark things up?
>>
>>56486618
It's up to you whether the convenience of not having to hit ctrl-s then F5 on the browser is worth learning a new text editor.
>>
>>56486618
Notepad++ looks so dated. Just get Brackets, Visual Studio Code, Atom, or Sublime
>>
>>56486646
>learning a new text editor
The thing is that I don't use any of Notepad++'s shortcuts. I just enjoy the colorization.
>>
BUMP LIMIT

MIGRATE >>56486683
>>56486683
>>56486683
>>56486683
Thread posts: 317
Thread images: 28


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