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

File: 1445253019594.jpg (15KB, 249x400px) Image search: [Google]
1445253019594.jpg
15KB, 249x400px
>IRC Channel
#/g/wdg @ irc.rizon.net
Web client: https://www.rizon.net/chat

>Learning materials
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/

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

>Backend development
https://en.m.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.

>NEET guide to web dev employment
https://pastebin.com/4YeJAUbT/
>>
>>52432581
If I have only C# experience (almost a year) can I easily get into html/css/js and front end web dev in general ?

Is it too much to learn or too diferent ?
>>
>>52432612
It's easy.

Look on youtube "learn javascript in 13 minutes"
>>
>>52432612
It's pretty easy.

Add jQuery and all you really need is append/prepend/html and Ajax ($.get of $.put), you're now ahead of 90% of magpie developers.

Also, onload function is virtually the "main" function for each html file.
>>
>>52432612
Better give up now. Going from a close minded class based inheritance to glorious freedom of prototypical will blow your mind and make you a bitter cunt sniping at javascript for "not doing OO right"
>>
So I've changed the title, as well as the meta description and keywords for my website recently, and submitted it to be recrawled via the Google Webmaster Console. However, one day has passed, and my website still hasn't been recrawled - its title, description etc. on Google search appear to be old.

Is this normal? How long does it usually take for Google to recrawl and update your site's description and title?
>>
>>52432675
After the 12 min video and some research in google, I found out that I actually enjoy js, its different but I guess thats all you need for a web page (the front end) and I totally respect that.
I find it useful. C# and others like that are useful for other things.
>>52432658
What about angular and nodejs ?
Also do I need PHP to get hired ? Can I stick with C# instead of it, and still get ~same amount of opportunities ?
>>
>>52432811
Angular 1 isn't bad and for the most part you can summarise it to data binding, if you've done WPF this will feel pretty familiar. The view thing creates single page applications (SPA) which isn't as useful as you'd imagine.

Yes learn angular.

About node... It's okay although there's really nothing it can do that a skilled c# dev can't do better and faster. If you know C# network programming, you're probably better off sticking with it.

About PHP, yes there are many jobs for PHP, but there are just as many for C# and Java. PHP is such that personally I wouldn't even apply for those jobs let alone write it on my resume. I don't want to work with PHP. In the end these are just backend languages and any language can be used, so a lot of enterprise try hards make their team use C# and Java.
>>
>>52432581
Anyone know hows the market in London and around it ? I want to move in UK (coz relatives) and I was wondering if they hire junior front end devs A LOT or you gotta be someone with lots of exp and some kind of degree etc.
Also whats the minimum pay rate ?
>>
>>52432878
Thank you.
>>
File: 1376695810763.png (34KB, 300x309px) Image search: [Google]
1376695810763.png
34KB, 300x309px
>have something urgent to ask
>no wdg
>wait for a thread to appear
>forget what I was going to ask
>>
>>52432940
Should have used a closure
>>
>>52432940
oh nevermind, I remembered. I need to use CreateJS for this college project, do you guys have any ideas on easy shit with it that can still impress the teacher?
>>
>>52432952
No.
>>
>>52433051
Thanks anyway for trying.
>>
>>52433060
I mean, I don't know your teacher. Just do whatever you suppose will impress him.
>>
>>52433071
I really don't need impressive shit. He doesn't even have a technology-related title, by impressive I mean "something that doesn't look like an example"
>>
>>52432952
Forum with login system.
>>
>>52433125
I don't need to make a whole system with it. Literally the equivalent of a mini-game or something. It's a small page of the website for extra credit.
>>
>>52433132
You asked for impressive, do you want decent marks or not?
>>
>>52433151
see >>52433082

Might not have been the right word to use. "not lazy looking" is better.
>>
>>52425330
Damn all noobs here make me mad.
Frameworks that are not rails are shit.
Front with react and flux or redux.
Back with nodejs. I use express. Best application server ever.
Use webpack like a boss to bundle all your shit and bam. Master race.
>>
>>52433132
>>52433161
Okay actually did some research, yeah you wouldn't use createjs for a forum. Looks like a graphics library, so enjoy making a 2d side scroller or something.

>>52433169
Nah

Front end as just append statements in Ajax callbacks, angular only if you absolutely must.
Back end your favourite C# library returning json serialized from a Dictionary<string, object>
You just can't get faster than that.

Tell me, exactly what problem does react fix for you?
>>
>>52432750
Anyone?
>>
>>52433200
>cant get faster than with C#
>hosting with Windows

Lel. Obviously never seen a real tier stack. Headless stripped RHEL/AIX will smash that for hosting. Basic bitches probably don't even tune their server containers.
>>
>>52433258
Mono > .NET

It's a shill thing to imply C# is only Windows.
>>
>>52432750
My experience is it can take up to a week, excluding factors like you didn't render the url first and check it in which case you only have yourself to blame
>>
>>52433200
You declerativly create your site. Write class-like components in pure js which are composable and reusable.

Instead of writing every change to dom and taking forever because you switch to c from js, you fucktard, you use react's virtual dom and render only the changes.
Using jquery is simply stupid and i feel sorry for you that you are such an inbred and dont think that writing such an imperative and ugly code is legit.

React is facebook's solution to creating front end. It was made through evolution and underatanding. Not a product of two google fags that had a fucking side project and created such a massive disaster they had to rewrite it in angular 2, dropping most of what was unique in angular 1 and simply copying react's core code.
>>
>>52433282
Except then you need either node or .NET (for jsx) to actually use it, locking you down to certain technologies.

Also, you make out as if modifying the dom is hard or something?
>>
>>52433307
>>>52433282 (You)
>Except then you need either node or .NET (for jsx) to actually use it, locking you down to certain technologies.
Not quite. React doesnt care how you give it the information. You can use rethinkdb and get the information directly from the db. If you use flux or redux to maintain the information so it can do the ajax however you want.

>Also, you make out as if modifying the dom is hard or something?
It's not hard. But if you have to do it many times its very slow.
The analogy is writing to disk. It takes a lot of time. So react does it once and applies only the diffs
>>
>>52433353
>It's not hard. But if you have to do it many times its very slow.
Which is why I build a string and only use append once per function. Yeah, okay that's a gotcha about jQuery, but it's fixed very easily.
>>
>>52433390
It becomes really shitty really fast.
Consider trying react. Its beautiful and simple.
Look for Ryan florence. The react messiah
And Dan Abramov the react god.
He writes presentations in react and using redux shows the flow. Amazing
>>
>>52433434
Personally I want to be doing as little JavaScript programming as possible, so I'll stick with jQuery. It's literally one line of code to modify the DOM.
>>
>>52433770
Page squat to steal the renewals before the owners do?

There's plenty of Russians already do this, you'd be hard pressed to compete.
>>
>>52433770
page squatting in that way is also a crime, and it'd be conspiracy too
>>
File: I0aLuev.png (155KB, 1288x556px) Image search: [Google]
I0aLuev.png
155KB, 1288x556px
Performance gain over using the actual image?
>>
>>52435326
You don't need a separate GET request to get the image, since it's embedded in the html, and put there statically/by the backend.
>>
I was thinking about doing a web application similar to google alerts for my final project.

I was wondering what is the best way to get the latest and most relevant links every hour and serve them to the user.

I know I can do it with Python and few web scraping libraries, but I don't think that is efficient.

I didn't use PHP for this but I know cURL can help here. The problem is, now I've read that scraping google is a big no-no and they block you after about 40 requests. Can somebody please help me here?

My plan was to search for a specific keyword with additional parameters like date, relevancy, blog/news/other sources etc. Can I search that with some PHP library and grab the top 5-10 links and then put them in the database and show them to the user inside of the web app? Is that the right way to do it?

TL;DR of the app is that you have your user account and you choose a certain keywords you want to monitor, e.g. "Oscars 2016", some game name, celebrity or similar, and you can track their mentions on the internet - every hour/2/4/6/12/24 or whatever, the results show up in your feed so you don't need to google search all the things you want to keep track of a few times every day. It is basically automatizing the process. I'd probably try to implement a few more features too, but in the nutshell it is like google alerts app.
>>
>>52432581
bum
>>
As a back-end dev that has to work on front-end and want to do as little js as possible, what would be a good js script for form validation?

For example something with data-validation attributes and a js file to include that would then just werkâ„¢.
>>
>>52436611
Common things like length, valid input (e. g. email field should have a valid email), max-min value for number fields, etc, can all be validated with plain HTML5

http://www.the-art-of-web.com/html/html5-form-validation/
>>
>>52436611
regex patterns
>>
>>52436696
Does that work on every browser? Is it possible to display an error message? Is it possible to decide whether you want to validate on focusout or on submit?

I don't want to develop js, but I'm not that dumb. I can use bootstrap and popover. To make something generic but that actually looks nice.

>>52436739
wat
Yes, of course, regex. But that won't be enough to validate the form. What script should I use to handle my regex?
>>
File: 1450068280241.gif (1MB, 245x173px) Image search: [Google]
1450068280241.gif
1MB, 245x173px
What's the best way of debugging PHP? I currently use sublime and Firefox Developer Edition.
>>
>>52436821
Throwing all your PHP code into the dumpster and choosing a new language for your back end
>>
>>52432612
>too different
>JS is hard to master it
>>
>>52436961
Nice response. But My school forces me to learn PHP.
>>
>>52436570
please? Google search api seems to limit number of queries by 100. That means that if I want the server to execute a PHP script every hour for who knows how many users I will not be able to do it, right?
>>
>>52432750
1. Never use meta keywords
2. It can take longer than a day, sometimes a week. It depends of your website.
3. Putting your title, does not mean Google will display it exactly like that in the SERP.
4. Can you check your logs to see if Googlebot crawled your page?
>>
Good asp.net tutorials? Want to learn something new.
>>
>>52438039
>school forces PHP
>>
LESS or SASS?
>>
>>52439646
Neither.
>>
Why do people here act like PHP is the worst thing in the world and you shouldn't bother learning it? 50 percent of the job applications I've seen require PHP.
>>
>>52439979
Because it's dying. The jobs for PHP are either maintaining an old site or creating small WordPress sites. Neither of them are appealing and PHP is losing market share constantly. For a starting dev learning PHP is useless and they should be focusing on better or more popular, as in more hype behind them, languages if they want to find any work.
>>
>>52439979
Because hating on php is considered cool these days.
>>
>>52440043
I see. But what language should I learn for back end then? I want to vomit whenever I see phyton syntax. C# seems to be the more reasonable option.
>>
>>52440080
C# is restricted to ASP isn't it?
>>
>>52438888
not him but I know that feel
I literally just finished my last web development class of the major and I never learned anything other than PHP, I want to kill myself
>>
/g/ I need your wisdom

I have an offer for a lower-paying position, and the deadline is in a few days. I'm interviewing for higher-paying positions at two other places, but I have no idea if they'll make offers, and I wouldn't know in time to juggle the offers.

Do I take the shitty offer just to play it safe, or stick it out and possibly end up with no offers? Note that I can't ask the first company to wait on me for over a week, so it's one option or the other.

======================================

>>52440043
It's not dying. PHP7 introduced some great features. Also, look at http://php.net/usage.php. It's even consistent in Stack Overflow's language trend reports. Learning PHP is absolutely not useless, and I would argue that finding a PHP job is much easier than finding a job with a trendy language or framework because competition is so insane in those spaces. Granted, the work won't be as 'agile' and 'world-changing' and 'free snacks and beer on tap! L0L!', but don't shit on a language because a lot of devs misuse it.
>>
>>52436611
If you're fine with jQuery, the jQuery Validation Plugin is really friendly. You can specify error messages like
{
required: 'You didn\'t enter a username.',
minLength: 'Username must be at least n characters long'
}


>>52439646
SASS is considered better by most. Google why, there are plenty of resources. There's no reason you can't learn the paradigms of both in a couple of hours though, if you're already decent with CSS.

>>52435326
I'd load images like that sparingly, maybe even just for thumbnails. It's ugly, and probably much slower for large images. Between image caching and the time it takes for browsers to decode that huge string, I'd say go with normal images. Use a sprite sheet if you're so worried about GET requests.
>>
>>52440342
Why not just take the low-paying job and jump if the higher-paying jobs give you an offer? Because it's a shitty thing to do? They're being shitty to you by offering low in the first place.
>>
>>52439979
Ikr
>PHP is supposed to be the worse thing ever
>js is supposed to be ok
https://www.youtube.com/watch?v=FqhZZNUyVFM
>>
How's the work environment in front end jobs? I'm a VFX and motion graphics artist but i recently quit because i was just not enjoying it anymore. One thing i hated was how everyone in this work field is the social hipster who thinks they know everything and can't keep their mouth shut. Been learning front end for 6-7 months now. Hoping people in this field aren't as annoying.
>>
File: RMsnqCF.gif (915KB, 476x253px) Image search: [Google]
RMsnqCF.gif
915KB, 476x253px
Just saw some random arab write an article shitting on C# for web dev. Went on to call NodeJS a scripting language.
>>
>>52440657
It's a decent salary given the area, but the other offers would be a bit higher and in better locations.

People talk to each other. Jumping after accepting, morals aside, is a bad move for a number of reasons.
>>
>>52440080
I've heard good things about C#, also Go seems to be making name for itself but I haven't tried them myself. Elixir seems really promising, and it's my current favourite since I really like functional programming. I know /wdg/ claims js on back end is a meme and it's mostly true but the AMEN stack has a huge amount of hype behind it right now. Python and ruby are both popular and have stable crowds even though neither is my favourite. And then we have the behemoth that is Java EE and Spring because who doesn't love AbstractBeanFactoryHelperImpl and a million xml files.
>>
did an experiment yesterday, elm-style architecture in plain js, using baconjs, immutablejs, and a redux-style reducer. it worked well
>>
>>52440828
I feel like I've been waiting for Go to takeoff forever.
>>
>>52432581
Need to start learning html, css and javascript again.
What program should I use to code in?
Had this free one, but forgot what it was called.
>>
>>52441611
Komodo was the program I used to have...
>>
>>52441611
Notepad++
>>
>>52441715
Thanks.
>>
>>52441611
Use Sublime Text
>>
>>52441611
Vim or emacs
>>
>>52441611
Intellij idea
>>
>>52441981
Well look at this fancy penis pump.
>>
>>52440186
https://github.com/MichaelFroelich/FAP.NET/blob/master/README.md
https://www.nuget.org/packages/FAP.dll/

Can be used to create backends quickly and simply that have reasonable performance. It's best to extend the page class. No ASP or horrid XML config files needed. It's best for returning json and html (or xml) from your backend, since it'll automatically change the content type for them, from there you can make your site simply append statements in Ajax callbacks like a pro.

Also, it was tested on mono, works perfectly fine on either.
>>
>>52444264
I'll just stick to the shitty PHP I already know until I learn NodeJS
>>
how easy it is to turn a static website to dynamic? Currently doing some mockup sites but only using HTML, CSS and JS. I want to eventually make them dynamic.
>>
I'm using replaceChild to replace a <img> for another <img>, and trigger a get request for another image afterwards. The problem is that the image change is not instantaneous, kinda like the rendering is interrupted. If I comment out the GET request, the image change renders almost instantaneously. Can I make it so that the get request happens only after the change is completed?
>>
Can a css class have a bunch of classes in it?

for example in my HTML I have

button class="btn btn-lg btn-primary"
in a couple places in my site. can I use CSS to create a special button with all these? The CSS tutorials all refer to attributes like background-color:red etc
>>
>>52445798
>Can a css class have a bunch of classes in it?
No, not in CSS. A mechanism for this is one of the most common features in CSS precompilers. In less they're called "mixins"
>>
>>52446090
>precompilers
err, I mean preprocessors
>>
>>52446108
can I use django to do something similar with the {%%} syntax?
>>
Is there any solid way to write reusable templates without server-side code? For instance I want to create a new element <companyfooter> which I can use in every .html document that should show the company's footer. It's an entirely static website and will stay that way.
>>
>>52446164
Ehh, depends on your use case. You could write a custom template tag that expands a class name into a space separated set of other class names easily enough but the issue would be that the client side wouldn't know anything about that mapping. So like if you combine "btn btn-lg btn-primary" into "combo-btn" you could use the "combo-btn" class in your templates but you could never apply it to anything with javascript.

So if you know you're never going to need to apply these amalgamated classes to anything outside source being generated by templates (that is, if you're never going to toggle these classes with JS) then that would be fine.
>>
>>52446301
good to know. Seems just to not be a generally done thing then. This particular case, it's better to just leave it be since it only appears a few times. thanks.
>>
>>52441554
I'd rather using Lua.
>>
how can we make a thread for programmers that isn't babby retard tier or overly specific?
>>
>>52447833
If you have something especially interesting to talk about, start a thread. Otherwise, stfu.
>>
>>52432952
Write a button that runs away when you hover your mouse over it and makes farting noises when you actually click on it.
>>
>>52447833
By not posting on /g/ prolly
Honestly though there's a pretty even gradient between people being square/boring/fags and being competent programmers. That is to say, as a community gets better at programming it becomes increasingly more insular/thin-skinned/occupied-by-adults so good programming threads are almost always on communities where you can't actually speak your mind.

We can both find evolutionary reasons for this but I also think many programmers can speak to this phenomenon from experience, I know I've seen it over and over.
>>
Does anyone know how to do this scrolling effect preferably using pure JS?

http://corona-extra.jp/
>>
>>52448588
who designed this site is a fucking idiot
>>
>>52448588
Disgusting. Please do not use this effect.
>>
>>52446208
copy paste it into every html file? Are you serious, or are you just acting dumb?
>>
>>52444788
Depends what you mean by dynamic. Do you mean pages populated by data served from a database? If so, there are a few routes you ca take.
>>
File: 1452857223696.jpg (225KB, 481x680px) Image search: [Google]
1452857223696.jpg
225KB, 481x680px
How many high quality, medium-sized projects in your portfolio is enough to get hired easily?
>>
Does anyone know why I can't copy HTML directly into Gmail and have it formatted properly?

It's just a table.

But using zeroclipboard to copy the table to the clipboard, then pasting it shows the proper formatting.

The fuck is going on?
>>
>>52449159
>>52449467
Looks pretty good to me. Are you by any chance back end or front end with no design knowledge? Usually it is those type of people who say no to these type of fancy effects because of muh functionality. They end up making plain looking sites.
>>
>>52450344
If they're really professional quality just 2 or 3.
>>
>>52450480
It's shit.

And yes I'm a full stack dev with no design knowledge. Might be why I still remember that usability always goes above pretty effects. And browsers nowadays support enough features so that you can make your shit look good while keeping it usable.

If you're handling scroll with js you're doing it wrong.
>>
What are some use cases where one should use array/json data types in PostgreSQL?

I know about normalization and data redundancy, while it is well and all for a project I'm working on which has a lot of relational data, I'm starting to consider using postgresql's array data types to handle M:M relations, e.g. a monster has many skills, a skill belongs to many monsters, the standard schema would be:

monsters: id (PK)
skills: id (PK)
monster_skill: monster_id (FK), skill_id (FK)

But the following way would also be possible with arrays, right?

monster: id, skill_ids (array)
skill: id

Is this feasible as another way to handle schemas?
>>
>>52450780
Nice opinions there grandpa. I bet you also believe gestures are shit too.
>>
>>52450858
No. But as soon as you start prioritising pretty effects over usability your site will go to shit. It's fine if all your site has to offer is pretty pictures and it's only function is to help people kill time. If the users are supposed to actually do something on your site they'll stop using it if the UX is shit.
>>
What does /wdg/ think of Elm and PureScript?
>>
Any of you web devs college drop outs?
>>
File: tumblr_nuhbagZeqd1rcubgxo2_500.png (191KB, 500x370px) Image search: [Google]
tumblr_nuhbagZeqd1rcubgxo2_500.png
191KB, 500x370px
>currently developing a website with absolutely no JS or anything fancy (Primarily a hidden service) that has to pass data to a backend engine and give all kinds of outputs etc
>In addition to this, it has to look good
Thank FUCK for spring and thymeleaf
>>
>>52451046
Ph.D. dropout here.
>>
>>52451046
Well not a drop out since I'm still technically a student. I'm only missing my thesis from graduating but haven't really had the motivation to finish writing it as I've been working for the last year and a half. Going try and gather some motivation and do it before summer so I can graduate since it's the only thing I'm missing.

Internships are dangerous.
>>
>>52450947
Why is that site not usable according to you? The card swipe effect it has is very gesture like and doesn't get in the way of the info the site is providing
>>
>>52451170
Have you tried it on a mobile browser. The scrolling didn't even work on the first browser and was slow as fuck even on chrome. Not to speak of the load times.
>>
I can be a web dev too but I choose not to because only losers become webdevs
>>
>>52448588
http://matthew.wagerfield.com/parallax/
>>
>>52451202
but it's easy money.
don't you want to get paid a lot for almost no work?
>>
>>52451202
Instead you choose to shitpost from your moms basements like a true NEET. Go back to /dpt/.
>>
>>52451232
>>52451233
Don't feed 'im.
>>
>>52451241
the thread would be dead otherwise anyway, can at least feed some of them for entertainment.
>>
At what point can I call myself an intermediate JavaScript user?
>>
File: BIG NUT.png (14KB, 519x321px) Image search: [Google]
BIG NUT.png
14KB, 519x321px
>Just finished my end of the webdev project
whooee that was fucking awful
now I feel empty inside because I can't think of any other features to add until I integrate it with my teammates stuff
>>
>>52451469
>b64 encode all of the things
FOR WHY ?
>>
>>52451541
It's encrypted, and is in base64 so that it can be stored as a string.
>>
>>52451557
but why as a string
>>
>>52451841
So it can be written to the type of file I'm writing it to
>>
>>52451841
>why store encrypted strings as strings
???
>>
>>52452294
blob/binary?
>>
>>52452365
Some things are as simple as they seem
in this case, java property files work just fine and have quick lookup times for values so I'm going with them
and they happen to take strings
>>
>>52451202
> being me
> being a senior 'loser' on a large company
> earning 10k euros / month after taxes working remotely in a country where the average wage is 1.2k euros /month

It feels good to be a loser... the company also asked me to speak at react europe this year but I'll probably pass as I'm more doing backend in the last 10 months
>>
File: Untitled.png (165KB, 1366x768px) Image search: [Google]
Untitled.png
165KB, 1366x768px
Best way to debug shitty PHP?
Isn't firefox Developer Edition prepared for this shit?
>>
>>52453265
>UNREGISTERED
>>
>>52453265
A browser won't help you debug, unless you want to go beck echoing out everything.

I was biting my teeth out on getting a good debugging environment for php last weekend.
Forget it.
It's shit. I'm amazed that such a popular tool has no good debugging tools.

Use xdebug, load it in your php.ini.
Then with a lot of luck and lots of configuration it might work.

I've been using codelite and phpstorm and got it to work once so far.
>>
>>52453345
Who the fuck pays for a fancy notepad
>>52453351
Sounds like the cure will be worse than the illness. I'll still give xdebug a shot. thanks
>>
Meh, if it's my own code I can just

print_r($someVariable);
die();


And step through things until I find where it breaks.
>>
>>52453265
you know you can crack it pretty easily
there's like 6 bits to replace with a hex editor
>>
>>52453480
Who the fuck bothers to use the unregistered version? Just use one of the dozen sublime copies if you can't afford the real deal or can't get it for free.
>>
>>52453351
>>52453265
>>52453480

okay so I played around some more, there's an extension for visual studio code which makes this work pretty easy.

it still requires xdebug running, but no weird configuration in some confusing IDE.
https://github.com/felixfbecker/vscode-php-debug

I just use phps integrated webserver, run the debugger in vscode with F5 and browse to localhost.
It just works.

It's at least something.

Now I'd rather use atom instead of vscode, since it, weirdly enough, resembles visual studio more than vscode which I'm used to.
But there seems to be an addon for atom aswell.
>>
>>52453542
Yeah, but I got deadlines to catch up to, pressing escape every 20 times I hit ctrl + S isnt that time consuming
>>
>>52453542
But hey, thanks for the heads up
>>
>>52453265
Try phpdbg, it's a cli debugger
>>
Do you apply to a company directly or via a work agency?
>>
Eloquent Javascript vs You Don't Know JS?

I've got a bit of experience under my belt coding, I can build single pages that piggyback off APIs to provide some small service.

I'm interested in learning more about closures, relearning "this", learning about OO programming, learning about prototypal inheritence, learning about functional programming.

I could do with less of an intro to general principles of programming ("it's like baking a cake, or herding a stupid child" analogies, etc.)
>>
>>52453265
>$_GET['password']
pls no
>>
>>52455885
kek, the passwords are cleartext as well.
>>
>>52455885
How would you do that differently?
The only way to get an encrypted password is to encapsulate everything in https.
>inb4 client-side encryption
>js script send in clear text
>secure
>>
>>52456012
I assume he means because its a GET request, not a POST.
Why would you use GET requests for passwords.
>>
>>52455318
>I'm interested in learning more about closures, relearning "this", learning about OO programming, learning about prototypal inheritence, learning about functional programming.

so basically, you don't know shit.
>>
>>52456072
That don't really change anything, really.
GET and POST have exactly the same security: none.
>>
>>52456141
tell that the guy watching your screen who now knows your password.
at least POST doesn't show it in cleartext on the monitor by default.
>>
Why do people use frameworks which aren't Django?
>>
>>52456578
my clients server does not support python.
>>
>>52456801
Why do people own servers which don't support Python?
>>
>>52456876
because they are cheap and don't want to spend money on it.
>>
>>52456876
Because it isn't as popular as other languages. If you really want to use Python you'll either have to host it yourself or get a VPS.
>>
>have to make a php API
>read into different frameworks
>get recommended laravel lumen
>look at documentation
>package manager which loads 100 different projects
>dependency manager to generate files
>things break if you don't run dependency manager after adding a file to scan them

what the fuck.
>>
>>52455318

Eloquent
>>
anyone here worked with wordpress vip on a legit-scale site (1MM+ monthly users)? how is it to work with? comfy or a pain in the ass?

doing drupal now but might be on a wp vip project, have only used wp.com before
>>
>>52457926
Isn't that just hosting with some tiny extras?

I've only had a site with WPEngine, and while it had some nice features it's overpriced and takes away a lot of freedom, not to mention they got hacked or something not long ago (?).
>>
>>52458034

it's hosting with some extras and i'm wondering whether they help or hurt

cost isn't my issue b/c the client/company has already decided, just trying to figure out what it would be like as a dev platform
>>
>>52458547
I'd only go with them if either:
1. Can't setup a server myself
2. Don't want to be responsible for the clients site going down
>>
Before I put in the embedded Twitch stream, everything was on the same line and the hover sub-menus would just show up below.

Since I put in the Twitch stream, it moves everything past Twitch below it, and I'm not sure why.

Any help?

https://jsfiddle.net/p6w0t9gy/

Thank you friends.
>>
>>52458598
your <ul> for twitch is outside of the <li>

are you even looking at your browsers inspector?
how can you miss this?

the rest of the style is also a huge mess with pixel values everywhere.
>>
/g/, I'm 23, no job and no degree. Are you telling me that I'd be able to find a job as a front end dev? And if so, how long would it take me to get to the point of being employable?

This is srs post, pls no bully.
>>
>>52459257
6 months if you don't know anything, isn't stupid and will work hard.
>>
>>52459275
Have any of you done this? I want to believe this is a real thing.
>>
>>52459353
You can learn most trades in 6 months if you work hard, is it hard to believe?
>>
>>52459257
At least get a cert, maybe even Comptia A+ even though it isn't directly related to web dev.
>>
>>52459370
It just seems too good to be true. I'd be in heaven if I could get a job in tech. For some reason I assumed all these jobs went to CS grads.
>>
>>52459257
22 here, here's my story:
Dropped out after two years. Immediately started a small company, did freelance work on the side, some open source work, and learned new stuff whenever I could. I was easily pulling 80-hour weeks for a year. I've since sold the company, and have been looking for a normal-person full-time job because I want a solid routine. So, note that I'm way overqualified for the positions I've applied for.

My response rate on applications was great, but I'll say that not having a degree has been the single biggest pain in the ass. I've had great offers rescinded because of no formal education. I've had top companies and recruiters literally say "well, we'd love to hire you but we can't move forward in the process because you need a degree in /something/, doesn't matter what it is"

I fucking despise the US's degree system, and I fucking despise recruiters who toss applications without knowing what they're looking at.
>>
File: 1450033424105.jpg (207KB, 600x450px) Image search: [Google]
1450033424105.jpg
207KB, 600x450px
How to store serverside website data (such as posts) temporarily, in between the times when it's put into the database?
>>
Also, if a website has pages generated via a GET request, and all these pages have content, how do I avoid huge drains of resources every time there's a GET requests? Any GET requests lead to all the posts being pulled from the database, sorted and ranked on my site, which leads to huge resource drain. How do I design it better?
>>
>>52459546
on cookies
>>
>>52459623
Let me rephrase it.
How to store serverside website data serverside, in between serverside backups (when this data is put in a database)?
>>
>>52459546
Depends on the use case. I'd say cookies, but you want it on the server. My first reaction is to suggest a small cache or something, which would let you hold and modify data however you wanted, then you could pass it to the DB with a simple service.

>>52459610
Limit the info you pull. If it's a huge post list, maybe load a few at a time and implement some infinite scrolling with AJAX, or pagination. If you insist on showing everything at once, you can definitely cache that data until a post is modified or added or whatever criteria you want.

>>52459452
Nobody cares about certs like that unless you're working IT. You should know the content in certs like the Net+, Sec+, and Linux+, but stuff like that is usually glossed over.
>>
>>52459659
you don't.

why would you not write it to a database directly?
>>
So what do you have to know to be a working dev?
>>
File: 3YvdLEE.webm (858KB, 390x220px) Image search: [Google]
3YvdLEE.webm
858KB, 390x220px
Im new to this so bear with me. Im trying to learn more about using git. Im using a hosting service that offers a git repository that i simply push too. However, they do not have the "pull" feature that Github has, they just have the barebone git. So how do i keep my local copy up-to-date with the repository? I am working from two different locations (two computers), so when i finish working on computer A, i push the changes to the repository, then i need to update or "pull" on computer B so its up-to-date with the repository. Then i can continue working from computer B.

How do i do this without "pull"? Im am very unfamiliar with using Fetch and Merge so im scared im going to break something.
>>
>>52460196
Git without pull? Never heard of it.

Sure you can't just type
git pull
?
>>
>>52460196
https://git-scm.com/docs/git-pull

pull means you download the latest data into your local repository.

if you didn't change anything on both computers at the same time, pull will just download and not merge anything.

what github calls a pull request is actually a merge, which you can do locally too.
>>
>>52459787
HTML 5
CSS 3
A conventional back-end language (PHP, Java, C#)
A modern back-end language (NodeJS, Go, Rust)
Javascript (not related to NodeJS)
At least 3 frameworks for each back-end language, +5 for Javascript (not including micro-frameworks and small libraries)
MySQL, MSSQL and Oracle databases
Webservices (you should be able to write a SOAP service from scratch in 60 seconds)
Git
At least thre webservers
Intermediate GNU/Linux sysadmin skills
MS Office
Docker
Vagrant
A 500+ stars repo on Github
A computer science degree
5+ years experience

That should probably land you an intership but don't expect to make any money.
>>
>>52456578
>>52456876
Everything Linux supports python/django.

>>52456975
Everyone should use a VPS...
>>
File: Untitled.png (156KB, 1366x768px) Image search: [Google]
Untitled.png
156KB, 1366x768px
>>52456072
>>52456012
>>52455885
There's an intermediate php page that handles passwords recieved by get and then send you back to the landing page if fail to success.php is success. This happens so fast the URL with the password is unreadable, anyway it gets paresed into MD5.
So not even I can read the info passed using the URL
>>
>>52460308
you are assuming a stable connection, a shaky one will take a while to do that request.
>>
>>52460343
Plus it'll be saved in the browser history.
>>
>>52460308
md5 is very bad, don't use it. read up on some articles on how to correctly store passwords.
>>
>>52459257
Depends on where you are.

Over here there is no especially strong tech industry, the jobs the government creates for "young people" are retail, ie to make my city a "fashion capital". It means getting a tech job kind of necessitates a degree.

>>52459518
Trust me, it's worse outside of America, especially true of you're male and can't ping that "gotta more women in STEM" thing that all HR women have.

Sure it's hard, but it's harder elsewhere. That's all.

America is easy.
>>
>>52460196
git request pull
>>
>>52460452
Like a third of my coworkers don't have a degree. And most of them are in their 30s or 40s. Most of them were studying for some relevant degree but took an internship position for a summer and are on that road still. Your motivation to go back to school and finish your studies drops instantly as soon as you start getting paid for doing the same shit since most of the time working is actually interesting and meaninful.
>>
>>52460370
care to explain why?
>>
>>52460452
I dont have a degree and make 6 figures. Although I've been in the industry for over 10 years. But if there is one industry where you don't need a degree, it's web development.
>>
>>52460308
>so fast
>not knowing that you can capture packets and save packets to read them
>>
>>52460607
http://security.stackexchange.com/a/16399

and then look at http://stackoverflow.com/a/1581919
>>
>>52432612
it sounds like you are so lazy you couldn't buy a book and get your ass motivated enough to read a book.

/g/wiki

You could always go back to playing counter strike and LoL again, or an hero dude. JK dont an hero. TLDR: quit being fucking lazy and open a book peasant.
>>
>>52460607
>>52460660
and don't forget this https://blog.codinghorror.com/youre-probably-storing-passwords-incorrectly/
>>
>>52460196
git pull
it is basically git fetch and merge put together, literally says that in the first paragraph of the man page for git pull. The only unique github feature is their version of pull requests.
>>
>>52459695
>Nobody cares about certs like that unless you're working IT
Well it sure as fuck beats having a blank resume with no other form of formal education.
>>
>>52460271
>That should probably land you an intership but don't expect to make any money
The fuck out. I've seen jobs offering upwards of $60k for just front end + PHP, SQL
>>
>>52460751
Thanks a lot man, I did get how important hashing algorythms are, and it is well explained how it works, now the problem is how do I make the transition password storage on my site and the database that are currently just md5 based
>>
>>52461104
You will have to email users to reset their password.
>>
>>52461104
Damn it looks like I have dyslexia wtf was I thinking
>>
>>52450788
>Is this feasible as another way to handle schemas?
I would work but an M2M intermediary table would almost always give better performance. There's no good way to index arrays so you generally shouldn't be joining on things like array membership. You want to use arrays values, that is not referent to anything else.
>>
http://stackoverflow.com/questions/34827776/socket-extension-and-ssl

any ideas?
>>
>>52451170
>doesn't get in the way of the info the site is providing
Between the atrocious load time and the fact that I never saw more than two sentences on my screen at a time I'd say yes, it does get in the way of the info the site was trying to present.
>>
>>52461104
You could make you hashing algorithm md5 > bcrypt (or whatever) so just re-hash your current passwords with the new algo and all new passwords get hashed with md5 first then the secure algo. I mean you waste the time in doing the md5 hash every time but it's not a lot.
>>
>>52460651
That would work over POST too, I'm talking about somebody looking over your shoulder
>>
>>52448409
I don't know how true this is. But I do know that /g/ is terrible at programming. It's like baby's first steps all the fucking time.
>>
>>52461468
Double hashing isn't recommended.
>>
>>52461982
doing md5 then bcrypt would be bad

but bcrypt is based off of multiple iterations of a hashing algorithm
>>
>>52461468
>md5 -> bcrypt

this reduces your security dramatically.
do not do this.
>>
>>52462186
How exactly? You spend some CPU time on the unnecessary MD5 but it's still going to be as hard (slightly harder actually) to crack MD5+Bcrypt than Bcrypt alone
>>
>>52462276
>it's still going to be as hard (slightly harder actually) to crack MD5+Bcrypt than Bcrypt alone

Incorrect, actually.

Md5 is susceptible to collision vulnerabilities. Knowing this, should one attempt to bruteforce your md5+bcrypt database, all they would need to do is find any string which outputs the same md5 as the actual password, instead of having to find the exact password like they would if you were to only use bcrypt.

I think the risk of this is incredibly minor, but stacking hashes does NOT increase entropy.
>>
So I posted a couple days ago and was talking about a small transaction project, just for fun. Basically a small web interface where one can see other users, send them "currency" and then have this transaction logged and completed.


I'm having issues displaying the balance on the index page. The pastebin shows the code for the index page.

http://pastebin.com/JyHSWbMX (the echo json_encode is just for debugging i guess)

The way this is set up is I have two tables, users and transactions. Balance is stored in the second column of 'users'. How do I display the current balance of the user here?

Cheers.
>>
>>52462679
>collision vulnerabilities
Do you know what that means? The MD5 digest space is a lot larger than the typical password space (32 bytes vs. the standard 6-8 bytes).

Yes, MD5 has collision vulnerability but that only makes it easier to work from an MD5 hash to a password, it does exactly nothing to reduce the difficulty in going from a bcrypt hash to an md5 hash.
>>
>>52432581
PHP or node.js or other?
Postgres or Mongodb or other?
>>
How well do you need to know front end development before getting a job?

>perfect semantics
>css architecture
>oocss
>sass
>nuances for optimization

that's not even mentioning javascript and the main libraries/frameworks.
>>
This is driving me nuts.

<button class="btn btn-sm btn-info" type="submit" id="submitUpdate">Submit</button>


$(document).ready(function(){
$("#submitUpdate").click(function(event){

alert(' ');

});
});


For some reason it's not even noticing the button. When I press it it's supposed to give me the alert (this is just the barebones of it btw, I have other code inside).
>>
>>52463231
>.clickl
kek, use on()
>>
>>52463258
That does nothing.
>>
>>52463231
Works for me: https://jsfiddle.net/01w55qus/

there's probably other code somewhere else getting in the way. Link to full source?

>>52463258
>kek, use on()
I mean it's more idiomatic but it wouldn't explain why this isn't working for him.
>>
>>52463158
>PHP or node.js or other?
Python. Use PHP only if you need to. Use node.js only if you're being held at gunpoint and told to use it, programming a backend with javascript is straight up retarded.

>Postgres or Mongodb or other?
Postgres already has jsonb so I don't see any significant advantages of using MongoloidDB, ever.

So Postgres. MariaDB/MySQL only if you need to. MongoloidDB, again, only if you're being held at gunpoint.
>>
>>52463371
He might as well do it correctly from the start.
>>
File: 1452027256090.webm (1008KB, 800x450px) Image search: [Google]
1452027256090.webm
1008KB, 800x450px
What do employers expect from Jr. Front end developers?
>>
>>52463371
Thanks, I figured it out.
>>
>>52463507
I'm currently copy/pasting french translations from a spread sheet to json for 40€ an hour
>>
>>52463507
Depends, at megacorps they expect really very little of jr devs, usually there are some vague expectations of "personal development" but really if you can do basic shitty hacked together code then you'll do alright. In a startup context my impression is that expectations are generally higher, you'll actually be expected to be productive after a month or so.

For the most part if you can slap together some dynamic content on a page (I don't know, maybe "can implement a carousel reasonably well" would be a good benchmark) you can do jr FED work
>>
Why shouldn't I use node.js?
>>
File: penn.jpg (78KB, 832x584px) Image search: [Google]
penn.jpg
78KB, 832x584px
>>52463861
>lets use the worst programming language ever conceived to create our backend when we have the freedom to select from C, Go, Elixir, PHP, Python, Erlang and Ruby
>>
>>52463861
>Why shouldn't I use node.js?
I think you should. The most common non-retarded arguments against it are that 1. node picked a fundamentally poorly designed language (JS) as it's base. I'm not saying anyone who writes JS is a fool or anything but even its most ardent fans will admit it has some serious issues. And 2. the callback approach to asynchronous execution is, arguably, a poor decision. If you want to see an interesting example of alternatives look at CSP style async and the "implicit async" approach you see in like python's gevent library.

I don't think either of these things are good reasons to ignore node but they're fair criticisms.
>>
>>52463983
But all the total execution times online rank it as #1
>>
>>52463983
>C
Low expressivity and no good approach to async IO make C a pretty bad choice for web application development

>Go
Largely the same issues as C except it actually has a good async mechanism. Unless you know ahead of time your app is going to need really efficient CPU utilization it's probably a bad choice

>Elixir
Cool stuff, community is kinda small, can't really hate on it though. Main advantage node has over it is the "one language for client and server side" thing.

>PHP
PHP is a trainwreck. I can't think of one example of a design decision PHP managed to get right that JS got wrong.

>Python, Erlang and Ruby
Same situation as Elixir except the community thing. All fine choices although I'd argue only Erlang can outperform node in the majority of use cases and even then you'll need scale for that to start happening. Main disadvantage is your font end and back end code are now in two different languages.
>>
>>52464022
>#1
>when C exists
lol
>>
File: wat.png (33KB, 187x687px) Image search: [Google]
wat.png
33KB, 187x687px
How do I figure out what is extending my page to make it scroll sideways? Every other page is full width, but with this page the horizontal scroll bar appears which means something is overflowing.
(I hope I explained that correctly)
>>
>>52464243
Hard to say without being able to inspect the page, can you link it?

Unless you specify a box-sizing value "width" refers to the horizontal size of the content area, meaning the actual size of the element will be the "width" value plus the padding, border, and margin. That's a common cause horizontal overflow. But again, being able to actually look at the page is the only way we could give you anything specific.
>>
>>52464113
>Main disadvantage is your font end and back end code are now in two different languages.
This is dumb. If you've learned one language it's not that hard to learn more. Barring languages in totally different paradigms I guess.

But would you avoid using a relational database because it's some newfangled NoSQL json solution?
>>
File: 1450203927461.jpg (30KB, 499x499px) Image search: [Google]
1450203927461.jpg
30KB, 499x499px
>>52432750
you should print out your website and send it to their headquarters
>>
>>52464362
not*
>>
>>52464362
>If you've learned one language it's not that hard to learn more
That wasn't my point at all. My main point is you can share code between the client at server side. Have a template library? You can render your templates both on the client side and the server side without writing two templates. Form validation? You no longer need to write two versions for client and server sides and remain secure. There's a lot of value in being able to move code between the two without needing to rewrite.
>>
>>52464304
I can't link to it, it's being hosted locally. Thanks for the info. I fixed it; I just randomly inspected the parts that overflowed until it eventually highlighted a part that were extending farther than it should. Specified it's width to get rid of the issue.
>>
>>52464413
>Have a template library? You can render your templates both on the client side and the server side without writing two templates. Form validation? You no longer need to write two versions for client and server sides and remain secure
Are nodejsfags really this retarded?
>>
>>52464610
>he doesn't point out what's wrong with it
>>
>>52464413
For validation, how much code could you honestly share? I'm used to validating the form and validating the model object I bind to on the backend. If everything was in JS there would be some commonality but not a ton. Beyond that the end result of the validation would be pretty different on the frontend vs backend so that definitely can't be common.

I think you could probably share other sorts of code more readily between the frontend and backend, like specific libraries.
>>
>>52464676
>I'm used to validating the form and validating the model object I bind to on the backend
Sure but it's nice to be able to validate on the client side too, having to do a roundtrip for each submission attempt is annoying compared to good client-side validation. It's not the single most important thing in the world but it's a nice touch. And like you said, there are plenty of other things you can share between client and server side.
>>
Who here uses Jekyll?
>>
File: 1390673832673.jpg (31KB, 250x251px) Image search: [Google]
1390673832673.jpg
31KB, 250x251px
>shit talking PHP
sometimes i try to remember what it was like to be 16
>>
Anyone worked on any Django projects here? What directory structure do you prefer?

Splitting the project in to multiple apps, each containing multiple models doesn't seem like a great idea because of changing requirements. To me it makes more sense creating one app, then creating a models, fixtures, migrations and views directory inside it, then just separate models in models directory.

Loving everything else with Django, it's amazing how much stuff can be automated just based on the specific model you define, such as migrations and forms. All it takes is "admin.site.register(modelname)" in admin.py to add it to the admin panel, where you can then add/edit/delete rows of the corresponding model.
>>
>>52465548
>using PHP
sometimes I try to remember what it was like to be 12
>>
>>52465580
Django's "apps" system has always been kinda ambiguous, there's no clear consensus on how the split is supposed to work. I'd argue most reusable functionality can be imported and wired into the appropriate place without the app structure and is more explicit (better) for it. So keeping a full project in one app is perfectly reasonable IMO, there are better ways of separating concerns that splitting things up by app.
>>
>>52465620
you must be shit at programming
>>
>>52465829
I wrote internet forum software in PHP when I was 12-13.
PHP is bad. It's redeeming virtue is the fact that it's so widely used.
>>
ded
>>
File: 1447661067683.jpg (23KB, 499x430px) Image search: [Google]
1447661067683.jpg
23KB, 499x430px
How do sites like Reddit show the contents of the next page when it's requested? They don't seem to be using Ajax, nor any JavaScript for that.
I know that the next page is loaded via a GET request, but how do they loop through the huge number of submissions they have and deliver you posts without completely overloading their servers?
>>
>>52468060
by having a shit ton of servers
>>
>>52468083
But isn't there more to it? Do they really loop through all the posts in their database when delivering the next page?
>>
>>52468117
Also, if they use output buffering/serverside caching:

Do they rebuild the entire cache with every post?
>>
>>52468117
Yes? This is hardly an intense operation, they might use a key=value datastore to hold the first pages list to speed things up, but thats fairly unlikely.

What database/software/servers have you been using that make you question if this is doable? it's just werk'd for years.
>>
>>52468676
But they have to calculate post rankings and shit before displaying the page, which means that not only do they have to retrieve all the posts from the database (literally tens of thousands, if not more), but also order them according to their algorithm.
How to do this without overloading the shit out of your servers?
>>
>>52468712
first of all, you store ranking as a metric in the database, you then simply perform a sort and limited the retrieved entries, if you don't have exactly the data you're after in a single query then either your schema is fucked or you're probably grabbing the entire post for the thread(which is only going to be a thousand replies/entries tops so no big deal).

honestly what's so hard to grasp here? you're just proxying and transforming the data.
>>
>>52468676
>>52468712
>>52468738

lots of memcached and some nosql-ish use of postgres:

https://github.com/reddit/reddit/wiki/Architecture-Overview
>>
>node is still at v8 version 4.6
sucking my head
>>
>>52469396
Sounds painful
>>
Is it bad practice to always use terminal for SASS to watch over files and compile them to css?
I imagine there are other ways but via terminal has to be the fastest right?
>>
>>52464113
>>C
>Low expressivity and no good approach to async IO make C a pretty bad choice for web application development
http://theboostcpplibraries.com/boost.thread-futures-and-promises
http://www.boost.org/doc/libs/1_60_0/doc/html/boost_asio/tutorial.html
Read please.

C is used, either fastcgi or boost, because you need a little extra speed, every tool has a place you know.

>Main disadvantage is your font end and back end code are now in two different languages.
I don't actually see how this is a bad thing except maybe so you can be totally sure you're hashing the same way on both ends?
>>
>>52463983
JavaScript is a bad language designed by a professional; PHP is a bad language designed by an amateur, which shows. "Good parts" JavaScript is strictly better than PHP even if neither is actually good.
>>
File: 1406598712517.jpg (25KB, 500x333px) Image search: [Google]
1406598712517.jpg
25KB, 500x333px
How do I choose a sorting function for my website?
It has to input how old the post is and its rating, and output a numerical value which represents the post's rank.
>>
>>52469784
Boost is not a C library. C++ is whole different beast from C. Unlike C, it's very expressive. It's problem is the complexity (templates are fucking Turning complete) and the slow compilation.
>>
>>52469910
>It's problem is the complexity (templates are fucking Turning complete)
Don't use templates.

>the slow compilation.
Try using an IDE.
>>
>>52469958
If you are >>52469784 it is strange of you to suggest not to use templates right after recommending Boost.
>Try using an IDE.
There are workarounds for slow compilation that don't require an IDE. The point about it being a language problem that C doesn't have still stands.
>>
faggots :D
>>
>>52470034

can girls be faggots
>>
>>52470301
yea,even if you are cute nerdy one
>>
>>52469898
Anyone?
>>
>>52470536
what database?
>>
>>52470564
MySQL
>>
>>52470536
>>52469898
http://www.w3schools.com/jsref/jsref_sort.asp

What's wrong?
>>
anyone knows how streaming on websites is accomplished?
i assume the client software streams to different server than the webserver, which is then accessed by some widget or something in the viewer's browser?
>>
>>52470989
Read about dash playback, it's probably the best method moving forward. alternatively you have to deal with flash or other hacks to get proper streaming to happen.
>>
>>52470983
What's wrong is that it uses JavaScript, and I need my sorting to be done serverside, using PHP.
>>
>>52471122
why don't you let your database sort?
they are optimized for that.
>>
>>52471122
http://php.net/manual/en/function.sort.php
>I don't even use php
>>
>>52471135
>>52471168
BECAUSE I NEED A FUCKING SORTING FUNCTION! I KNOW HOW TO FUCKING SORT AN ARRAY, YOU FUCKING IMBECILE! I NEED A FUNCTION WHICH TAKES IN HOW OLD A POST IS, AS WELL AS THE RATING, AND OUTPUTS A VALUE, WITH WHICH I CAN LATER PERFORM DATABASE SORTING!

WHY DOES NOBODY READ THE ORIGINAL POSTSS? IS IT REALLY SO HARD?
>>
>>52471300
you are in dire need to read this.
https://stackoverflow.com/help/how-to-ask
>>
>>52471300
>two inputs
>one output (either negative or positive, or a bool)
Fo you want a neural net? What are you looking for?
>>
>>52471300

Autist Mode: Engaged

>calls someone imbecile
>can't write backend code on simple rating system

BUT MAYBE RAISING MY VOICE WILL GET ME THE DESIRED RESULTS NO WAIT ITLL JUST MAKE IT SEEM LIKE A GREATER CUNT BUT IM TOO AUTISTIC TO UNDERSTAND BASIC SOCIAL NORMS SO ILL VENT LIKE A SPASTIC 12 YEAR OLD WHO JUST LOST HIS XBOX LIVE ACCOUNT
>>
>>52471329
I'm looking for a FUNCTION which takes in TWO values - how OLD the post is and its RATING.
I THEN want it to output an INTEGER value from 0 to INFINITY which would RANK THE POSTS.

I'm looking for suggestions of such a function. There can be infinitely many, but I'm looking for one which would result in an optimal ranking based on how new the post is and its rating.

I need a function which would rank content in such a way which privileges both how well-rated and how new the post is.

Here's an example:
https://medium.com/hacking-and-gonzo/how-reddit-ranking-algorithms-work-ef111e33d0d9
>>
>>52471417
WRITE IT YOURSELF FAGGOT. YOU MIGHT EVEN LEARN SOMETHING.
>>
>>52471300
Why don't you sort it in your database query?
>>
>>52471643
MY FUCKING GOD! DID YOU EVEN READ THE FUCKING REPLIES YOU FUCKING MORON IDIOT DIPSHIT IDIOT! WHAT THE FUCK ARE YOU EVEN DOING! STOP FUCKING POSTING THIS IDIOTIC BULLSHIT! I KNOW HOW TO FUCKING SORT SHIT VIA A FUCKING DATABASE QUERY! ANYWAY, I DON'T NEED ANY FUCKING HELP FROM YOU DIPSHITS ANYMORE. I ASKED /SCI/, AND I BET IT KNOWS BETTER THAN YOU INCOMPETENT, IDIOTIC PIECES OF FUCKING TROLLING IDIOTIC MORON FUCKTARD SHITS! FUCK OFF!!!
>>
File: 1425731789048.gif (3MB, 244x250px) Image search: [Google]
1425731789048.gif
3MB, 244x250px
>>52471709
>>
>>52471417

Golly, you're a needy little bitch. Bless your heart.
>>
>>52471709
he means in your SQL query you have

SELECT (criteria) WHERE (criteria) SORT BY (criteria) and remove the where if you're sorting all posts
Thread posts: 290
Thread images: 22


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

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


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