[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vip /vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
4Archive logo
/wdg/ - Web Development General
If images are not shown try to refresh the page. If you like this website, please disable any AdBlock software!

You are currently reading a thread in /g/ - Technology

Thread replies: 315
Thread images: 23
File: 1449342190628.png (868 KB, 822x552) Image search: [iqdb] [SauceNao] [Google]
1449342190628.png
868 KB, 822x552
Old Thread >>52286330

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

>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/
>>
First for C#, every day until the entire web is running it.

>>52317786
Vanilla js doesn't take 300ms for every library it has to fetch... JQuery is about as vanilla as I'd get, but that's because otherwise the dom selection and Ajax functions would get long and ugly.

I've been looking into this html forms, which don't use any JavaScript at all, but that limits you to get and post. Also, you have to have forms everywhere and your site isn't really dynamic, at best you'll have a few sections where text can appear.

That's really the point of a library (any library), to make programming easier. The thing about angular and react, etc, how are they making things easier? JavaScript already has methods to manipulate the dom (why data binding?) and jQuery already simplifies this as well as you'd want.
>>
>>52319567
Look at this hipster not using nodejs
>>
>>52319718
C# is faster, easier to organise (into MV* style projects, like a pro) and nuget means there are more packages.

Also
Page p = new Page("hello");
p.get = (a,b) => "[1,2,3,4]"; //sends back a json array with application/json as the content type
new Server(new Page[] {p});
Thread.Sleep(-1);

Node is great and it's faster than python/php/ruby etc, but it's barely more or less complicated than this and C# is faster.
>>
did pretty good on a javascript interview today. However I completely FUCKED UP on the last question. Can anyone tell my dumbass the answer? He wanted me to click a td tag, and make it turn red, and then if you click it again, it turns black, and then if you click it again it turns white. All the <td>'s start off being white.

Here's what I had

$("td").click("click", function(){
$(this).addClass("red");
if ($(this).hasClass("red")) {

$(this).removeClass("red");
$(this).addClass("black");
}

});



Overall i still feel like theres a 75-80% chance i get hired.
>>
>>52320107
$(this).addClass("red");
if ($(this).hasClass("red")) {

See here? It'll always have class red.

You were close, you just needed an else statement

$("td").click("click", function(){

if ($(this).hasClass("red")) {

$(this).removeClass("red");
$(this).addClass("black");
} else
$(this).addClass("red");
});

I'm also assuming there are classes red and black defined?
>>
>>52319567
>object oriented programming
>microsoft
>windows
lol
>>
>>52320500
>c#
>just Windows
Found the shill, keep pretending mono doesn't exist.

Also, f# can use the same runtime, the same libraries and is a pure functional language. Then you've got basic, iron python, c++ and even JavaScript. That's the awesome thing about intermediary runtimes, it doesn't necessarily force you into a language (or even an operating system).
>>
>>52320078
does c# handle asynchronous requests easily?
>>
>>52320107
the loop should look more like:
on click {
if( hasclass("white") {
addclass("red");
}else if( hassclass("red") {
addclass("black");
}else {
addclass("white");
}
>>
>>52320521
Hi mate; nice project.
You are violating the New Zealand Crimes Act 1961, New Zealand Privacy law and DPMC cyber policy office directives. Also it is unlikely this project was cleared by your university ethics boards which under Ministry of Ed guidelines may exclude you from passing the papers the project it relates to. I'm not reporting it cause I'm not a shit cunt but sort it out quick smart.
>>
>>52320759
Cheers man. My lectures seemed to promote this sort of thing.
Let's hope it doesn't get reviewed by the Ministry of Ed!
>>
>>52320604
You mean callbacks? Kind of.

public void CallBack(object sender, SocketAsyncEventArgs eve)
Parse(eve.AcceptSocket);
eve.AcceptSocket.Disconnect(false);
var ev = new SocketAsyncEventArgs();
ev.Completed += CallBack;
listener.AcceptAsync(ev);
eve.AcceptSocket.Close();
}

This is how I open a connection, the parse function just reads the headers and calls an anonymous function later (to do specific things, like return json strings of objects my website needs). It's about 10 to 20us faster to reuse the SAEA (socket async etc), but that causes memory problems on mono. Yes, all of this is asynchronous.

You just add the callback to the Completed property in the SAEA and it'll give you back that SAEA you gave it with a reference to a socket in the AcceptSocket property, from there you can send and receive using it.

There is a way which gives you a byte array instead, through calling ReadAsync after assigning a buffer property in the SAEA, but by doing that you're reading and then parsing the headers, instead of reading whilst you're also parsing. This might be simpler since then you just parse a byte array, but quite often the client might send fewer bytes of data than you'd expect in the entire headers, so you're better off synchronously polling the socket for how much data is available and then processing what you've got and polling it again.

Anyway, Linux and Windows this is the fastest way of using sockets. TcpClient is pretty fast on Linux, you can get it to around 400us using it's own asynchronous methods, but it's 40 times slower on Windows for some obscene reason.

BTW, this stuff should already be done for you by the web framework or library you're using. I've kept it as simple as returning strings for mine, which is all I (personally) want to look at when I'm the backend code for my website.
>>
>>52320107
Another way to do it.
$(function(){
$('td').on('click', function(){
var currentColor = $(this).css("color");
var nextColor;
switch(currentColor) {
case "rgb(255, 255, 255)":
nextColor = "red";
break;
case "rgb(255, 0, 0)":
nextColor = "black";
break;
case "rgb(0, 0, 0)":
nextColor = "white";
break;
}
$(this).css({"color": nextColor});
})
})


I'm sure they would have been somewhat impressed to see switch/case also.
>>
>>52321083
I know I am. Good job.
>>
>>52320213
>>52320646
>>52321083

thanks bros
>>
>purchase domain
>configure hosting service
>???

why does my site tell me it's 404 and object not found
>>
What is a good webdev language to learn that isn't for Panjeets and skids but also easy enough?

People were saying new php version is suppose to be good, is that worthwhile?
>>
>>52321392
Python
>>
>>52321083

this is the best example because its always in a loop. You can click forever and the colors would keep changing (assuming thats what you want)
>>
>2016
>not using materialize
>>
>>52321392
elixir, look at plug or phoenix framework
>>
>>52321541
What framework though? Isn't it terribly slow as well?

>>52321649
I cannot into that syntax... Also it seems way too new and niche, will it even be around in a couple years?
>>
Is node.js worth learning?
>>
>>52321712
If you care about speed, you must C# or Java. If you really care about speed, in the end fastcgi is still just returning strings.

Then again, I'd expect from your racist remark you look down on C# and Java.

>>52321581
Just jQuery append/prepend and return json from the backend, you can create your sql connection from the backend. Generally you'd want nginx or apache to handle your file uploads/downloads, you can moderate this using auth style settings.
>>
>>52321852
>c# or java
I'd rather eat my own shit than use either of them.

I might go with Elixir like that other young man suggested. Phoenix actually looks kinda cool and it seems enjoyable to learn something unusual.
>>
>>52321975
What an eloquent response...

You realise elixir isn't that much faster than python, right?
>>
>C# and java are for retards
>proceeds to use Python
okay
>>
>>52321975
>Elixir
>not slow as shit
Just use Java and remember to poo in the loo.
>>
>>52320107
>>52320213
>>52320646
>>52321083
Do people still use jquery like this? I thought everyone was using a frontend framework or something.

Honestly using jQuery to do the UI gets to be a bit of a pain past a certain point in size.
>>
>>52322289
>Elixir
>Slow

Lmao OK.
>>
>>52322443
What do you mean "past a certain size"?

You're thinking about angular, data binding and views are unnecessary for web. JQuery is about simplicity and minimalism, which it does well.
>>
>>52322567
i'm dumb

I just mean people seem to be moving away from it
>>
>>52321273
anyone?
>>
>>52322746
Not for any good reason though...

Web development is heavily plagued by fads due to being a weird midpoint between designers and engineers. JQuery is simple and light, which gives it infinite advantages over frameworks which want to take control over your entire process and turn your entire site into a SAP.

The only "downside" with just jQuery (which in reality means "simple Ajax and two character dom selection") is that its not mvc. I disagree with this because I feel the entire web paradigm (html, JavaScript, backend language of your choice) already is mvc.

Tldr do you actually need frameworks?
>>
>>52322966
I'd never make a website without a framework like angular/react/ember anymore.

Fuck doing things manually.
It makes shit a lot easier, more structured and saves a lot of time.
>>
>>52323849
>I'd never make a website without a framework like angular/react/ember anymore.
It's retards like you who are ruining the web
>>
Is Elixir a meme? Seems like no one uses this shit.
>>
>>52323871
How so, what's so bad about one?
It's a nice separation of data and frontend and makes it very maintainable.
>>
>>52323928
Please reply.

There's gotta be a reason no one uses this shit, right?
>>
>>52323871
>he doesn't know how useful modules/components are
>he doesn't know how useful databinding is

Geez anon, are you still doing everything by hand? Try that on a site with 20+ input elements.

Not saying that you need one for your tiny little homepage with 3 links on them, but if you have bigger data driven sites you seriously don't want to do them manually anymore.
>>
>>52323928
Well?

What is a non-meme?
>>
>>52324142
Is doing it manually really an issue though? You can pretty much dom select anything easily enough and work on that, directly with elements. Yes, even when you have 20 input items.

>>52324015
Isn't the backend/frontend separation enough?

I'm not saying absolutely don't use frameworks, I'm saying don't make it your default thing, sometimes you don't need more than jQuery.
>>
>>52324669
I like to avoid having to work with the dom directly.
It just gets messy when you need to add/change something, so I'd rather change some properties of an object and the dom updates itself without the need of selecting specific elements.

the last 3 projects I did at work I have used ember, and maintaining/adding features was just so simple compared to older projects where I did things manually.
>>
IS ELIXIR A MEME? AND IF SO WHAT IS NOT A MEME?
>>
>>52324863
everything is a meme
>>
This question may have been asked dozens of times already but fuck it: I'm looking for a very simple PHP MVC framework that can handle i18n easily. Is Zend any good at this?
>>
>>52324871
Feels that way when it comes to web development. It's all such a fucking meme.

Every language and framework is shit
>>
>>52324931
I heard laravel is pretty good, they also have a micro framework lumen.
Another micro framework would be Slim.

mind you: I haven't worked with PHP/laravel/slim, but looked at some frameworks the last few days for a project where I wanted a very slim API framework and can't use ASP.NET
>>
>>52320604
there's async/await keywords that are great, that the guy responding to you doesn't seem to know anything about.
>>
>>52324999
>read about new async features
>struggle using them
>don't understand how they work
>suddenly it makes click
>use it everywhere now

makes working with WPF/windows forms especially easy, I love async.
>>
How do you guys test your site on devices/browsers you dont have? I need to see if my shit works on Iphones Safari, but i dont have an iphone and there is no Safari for android.
>>
>>52325217
Run it in a VM.

You can emulate every os possible that way
>>
>>52324968
Can someone please reply?

How do people do web development as a job where there's such a lack of sourcecode to learn from and the whole area is broken into many languages and frameworks? Seems really strange compared to software development where everything is easily findable that you need.
>>
>>52324968
>>52325248
it comes down to what you prefer.
pick a framework you like, or none at all, make your own, it's up to you.

web development moves much faster than normal software development, there's a new frameworks every week.
new browser features every month.
>>
>>52324968
>Every language and framework is shit

Because Java, C#, etc.. are all shit.
>>
>>52320593
Just use Rosylin./
>>
How do you guys feel about Jade markup?
>>
>>52326650
C# is best, fuck you!
>>
is there a way to change the desktop image of someone who visits my website?
>>
>>52327070
no
>>
hmm.. and trick the visitor into root acces in any way? is that a possibility?
>>
>>52327213
no
>>
Are you as front end developer required to know PHP? I fucking hate PHP. I have experience with Python and Flask.
>>
>>52327552
You don't need to know all of PHP but you'll be much more valuable if you know at least the basics of it, it's not that hard and horrible to learn, most of the annoying things are for the backend dev.
>>
Any existing php backend systems ready to go that I can grab? what i mean is i drop the files in the folder, enter the credentials, map the database fields as needed and then i have a secure backend which i can use to manage my site (more for the client i just use PHPadmin).

or do i have to build all this myself?
>>
>>52327552
>>52327660

To add to what this anon is saying, it depends on where you're applying to. If the company uses PHP as the backend, sure. But it's possible the company may use something different for the backend, like C#.

Overall though, it's always better to know a little bit of a backend language so you could possibly communicate with the backend devs better.
>>
>>52321802

"yes"
>>
>>52327024
Note the sarcasm.
>>
Are you guys forseeing Wordpress being used in the upcoming years? Or are there better CMS's nowadays?
>>
Where do you guys store your uploads in the filesystem? I'm using an 'uploads' folder inside the project's folder (where the controllers, models and other directories are). Is this a good practice?
>>
>>52328355
I usually store them in app_data
>>
>>52328040
Wordpress would be long gone if being a better CMS actually mattered. It's all about the people who don't know shit about web dev being able to make the decisions.
>>
>>52322058
out of curiosity, how long is a django server responding time comparing to Elixir/Phoenix (which is around 500 microseconds for my 5 years old laptop)
>>
>>52319053
What Linux distro should I use for learning Web Dev?
>>
>>52328993
don't think it matters.

I'm using windows and only npm is sometimes a pain in the ass.
But the workflow is the same on my debian machine.
>>
So I'm forced to use PHP and haven't touched it since 2004.

I usually make ASP.NET backends using visual studio.
Is there a good IDE and debugger already that lets me step through code or do I have to echo out debug variables?
>>
where can i learn about databases in node.js
>>
>>52329322
no, rip
>>
anyone in here wanna help out making wordpress sites for small businesses? I'm trying to do it on my own but it'll be easier with someone else.
>>
>>52328993
OSX
>>
>>52329684
:(
>>
>>52325217
Chrome has device emulation that will reproduce probably 90% of device specific issues (well, for mobile anyway, your problems with older browsers are in the JS engines but w/e, you fix that one by using karma and automated testing). You can install a VM to get other desktop OS/browser (microsoft actually offers a free download of VM images with older version IE for testing) and OSX has an iOS simulater that I've never seen deviate from physical devices (except in accessibility mode, for some reason voiceover got left out of the simulator). For android there's a simulator but it sucks. The real solution is to go but a cheapie nexus whatever and use chrome's RDB.
>>
What editor do you guys use? Or do you use IDE's?
>>
>>52330453
Vim.

Atom and sublime are pretty hip with web devs I find. Webstorm is for people who can't let go of heavy IDEs.
>>
Does anybody here have experience with OrchardWeb CMS?

It's what we use.
>>
What do you think about PHPstorm? Is it recommended?
>>
>>52330453
Sublime generally. Pretty simple to use, no extra bells and whistles unless you want to add them. But at work PHPStorm and xCode.

>>52330617
We don't use half the features we should at work, but from my understanding, you can integrate PHPStorm into Git which makes it good enough for me. Syntax recognition for PHP (duh), SQL, and Twig templates are a huge plus when I'm being lazy.
>>
>tfw you are going through all of your VPS instances and can't figure out why most of them exist
>>
In the long run is becoming a full time self employed web dev without any post high school education a good idea? I know that for now I will be able to provide for myself with good margins but what about in the long run? Any thoughts and ideas?
>>
What should I replace mongodb with when working with node/express?
>>
>>52331698
I'd say ti is possible if you have enough skill and experience. If you have clients who refer other client who refer more clients, you can always have a pretty steady stream
>>
>>52320107
I'd do it like this:
var changes = {
white: "red", red: "black", black: "white"
};

$("td").each(function () {

var td = $(this);
var colour = "white";

td.on("click", function () {
colour = changes[colour];
td.attr("class", colour);
});
});
>>
File: hover.webm (158 KB, 732x351) Image search: [iqdb] [SauceNao] [Google]
hover.webm
158 KB, 732x351
I was wondering about the possibility to make something similar to [spoiler]https://jsfiddle.net/BenedictLewis/K6zCT/ [/spoiler] this function. However, I wanted new content to be hidden inside the block. Let's say I replace the block with an image and when someone hovers over it new text would be displayed under it and hidden when unhovered....are there any codes out there that could help me?
>>
>>52332165
just add the text, set the parents overflow to hidden.
>>
>>52331797
postgresql? like what do you actually need, a relational db, document or a key/value store?
>>
>>52332165
you cannot transition between a fixed height and auto, so you have two choices.

set a fixed expanded height and transition between those two
or
instead of using height use max-height and transition between them
set max height to something a little bit bigger what you expect to show.
it's flawed though.
the transition will think it has to animate what you set as maximum, so if you set max-height to 9999px it will animate to your contents maximum, but at the same speed as it would have to go to 9999px.

https://jsfiddle.net/hL17zj3L/
>>
>>52332522
Okay that is something I was looking for! Lets say that the box is an icon that has a transparent background, the text behind would show yeah?

I kind of wanted to have a icon --> when hovered --> text pops up beneath it
>>
File: hover1.webm (792 KB, 1677x547) Image search: [iqdb] [SauceNao] [Google]
hover1.webm
792 KB, 1677x547
>>52332522
This is how it looks right now. No icon is shown...
>>
>>52332838
probably can't find the image, what's your browser say?
>>
>>52332881
The picture was too big.... it is now working!
Thank you
>>
>>52319567
So a seasoned web dev would use jQuery only to traverse the DOM? I'm learning both right now and it does seem much easier to select elements with jQuery and the code is also much easier to read.
>>
>>52319053
do you guys recommend any good resources for MEAN stack developing ?

doesnt matter if paid or as book, or as video course

also it would be nice to learn programming concepts and not just some cheatsheet/guide how to operate the programming languages
>>
>>52333294
there's only one language there, js. use eloquent javascript to learn the basics.
only the N and E in MEAN are worth using.
>>
File: 1452189242728.jpg (74 KB, 526x567) Image search: [iqdb] [SauceNao] [Google]
1452189242728.jpg
74 KB, 526x567
>>52333602
>only the N and E in MEAN are worth using.
so how are you going to make a website senpai?
>>
>>52333794
not OP but heres another question
>>52333602
does eloquent javascirpt really teach something or does it just explain how thing works without really going deeper into the concepts ?
>>
>>52333602

Angular 1 is cool but 2 is going to be the main version soon and IMO it's really not that good.

React now baby
>>
Can someone describe to me in simple words what do MongoDB, Angular and Node do?
>>
>>52333834
read "the good parts" by crockford
>>
>>52333958

MongoDB is similar to a SQL database (like MySQL), used for storing data. It represents more like a document than a table.

Angular is a framework which gives you tools to do common things on a website or web app much quicker.

For example, say you need to get a list from a server, Angular includes functions to

-fetch the data from a server (similar to jQuery's $.get, etc...)
-repeat the list items (like a for-each loop)
-bundle up functionality, so if you needed a list like that everywhere, Angular would let you make a custom HTML element like <cool-list>, so you'd only have to put that anywhere you wanted that list within the site.

Node lets you run JavaScript outside of a browser, it is most commonly used to let you have a server written in JavaScript.
>>
>>52333794
for db I use Orient or even good old Postgres
for UI, usually rely on React, but am going to shift to Elm or Purescript, still assessing them. but if your site is simple, just use vanilla js
>>
>>52333834
eloquent js is very thorough, just look at the content page
>>
File: 1442783357737.jpg (1 MB, 1221x1198) Image search: [iqdb] [SauceNao] [Google]
1442783357737.jpg
1 MB, 1221x1198
So,

Can anyone tell me about an actually good wordpress plugin tutorial? I'm mostly a Python dev, but my current job wants me to develop a Wordpress plugin for them. I've been searching around, but the wordpress community is just such a pile of garbage.

Thanks in advance.
>>
I'm looking for a light-weight CMS with which I can edit one big frontpage, like list articles of some sort, etc.

Any ideas someone what CMS would be good?
>>
>>52335017
What languages are you working with?
>>
Why doesn't 4chan use websockets?
>>
>>52336233
Because you touch yourself at night.
>>
Is Elixir and Phoenix a meme?
>>
I'm watching a basic tutorial series on jQuery and the guy did this:

var $overlay = $('<div id= "overlay"></div>')


He said he's adding the $('') to the string because it converts it to a jQuery object instead of just a plain string, but I don't get what makes it different.

He is going to append it to the body tag like this

function onImageClick(event) {
event.preventDefault();
var href = $(this).attr('href');
$overlay.show();
}

$('#imgGallery a').click(onImageClick);

$('body').append($overlay)


It's just a plain string added anyway why does it need to be a jQuery object, and what's the difference?
>>
https://learnxinyminutes.com/docs/elixir/

I am not enjoying this language.

>string? Charlist?
>tuple? List? Binaries?
>both word bool methods and '&&' / '||'
>The ugliest case and switch ever
>"cond" and Oh shit this is influenced by concurrent languages
>The do keyword... We meet again
If I wanted speed and didn't give a shit about ugly code I'd use C++ and have a backend that responds quicker than my front facing server.
>>
>>52334545
I've been in these threads for a good while now and I've never seen any in-depth discussion about Wordpress. Most people here are either front-end or they focus more on specific languages rather than platforms like WP.
>>
>>52337323
We're too hip for Wordpress.
>>
>>52337206
Lmao mfw Elixir autists call it "beautiful syntax and code"

Yeah fucking right. This shit has got to be a meme, do people even actually use it?
>>
>>52337380
People actually use Physhit, I am not surprised anymore.
>>
>>52337196
>why is he converting to jquery object
ask yourself why anyone uses it in the first place
you don't really need that shit nigga, users fucking hate it anyway. keep it fucking simple.
what are you making that needs jscript never mind jquery? surprise me plz.
>>
>>52336233
why should it?
>>
Any of you use asp.net over PHP?
>>
>>52337409
I've been learning both and traversing the DOM and selecting elements is much more cleaner and easier with jQuery

I also hate how the call it DOM, shit got me confused for a while until I finally understood that it's just the HTML document.
>>
>>52337393
I can understand the Elixr hate, but dissing Python is taking it too far family.
>>
>>52337393
But Python is good
>>
>>52337380
Actually Elixir/Phoenix is the new hotness.
>>
>>52337380
>meme
just fucking die, everything with a hint of popularity that you don't personally like is a meme apparently.
>>
>>52337380
Only Rubyfags.
>>
>>52337196
>It's just a plain string added anyway why does it need to be a jQuery object, and what's the difference?
Maybe there's a performance advantage in appending objects instead of strings? It looks like he created the object from a string, personally I'd just append the string too.

>>52337380
It's a successor to Erlang, which is similar to VHDL, which is only good if you repeat back to yourself "hardware description language" every few minutes. Concurrent languages seem like a good idea, but in reality they're not really unless your hardware actually can do multiple things at once (threading doesn't count).

>>52337323
>>52337345
My opinion of WordPress is that its not hard to write your own blogging system in whatever language you want, which begs the question why serious programmers would use it. Someone tech savvy, but not a programmer, might like it so they can tweak the script, but they'd probably enjoy mezzanine and python more.

My sister uses WordPress. She is not a programmer.

>>52337409
Dynamic webpages. You're not worthy of a more in depth response.

>>52337468
JQuery is just about making exactly that easier to do, there is no reason not to use it.
>>
>>52337409
>users fucking hate it anyway
yeah man, people totally hate code working in their browser of choice. They just hate that shit.

>>52337468
>I also hate how the call it DOM
What else would you call it? It's not HTML in the same way C isn't machine code. There may be an isomorphism there but they're not the same.
>>
>>52337437
>>52337437
I'd sooner use it over php, but my favourite way is simple Ajax requests to a backend which returns json. The only issues I've had are the slight delay when users load the page and that Google webcrawlers can't see my posts.

Web doesn't need to be hard or learning a new framework every week.
>>
>>52337741
>The only issues I've had are the slight delay when users load the page and that Google webcrawlers can't see my posts
This is largely react's reason for existing, although it has other cool idea embedded in it too server side rendering off the same source was really the only "novel" thing about it.
>>
>>52336802
No, I'm using it.Not as productive as Ruby (since Ruby has more good libraries) but still pretty comfortable.

Also Pinterest.
>>
>>52337468
i learned js before jquery appeared. never understood the appeal never needed it.
>>
>>52337873
It has the same appeal as other frameworks. Makes your job easier and faster.
>>
>>52337807
I think asp would solve it as well.

Server side rendering can be difficult if my backend is only meant for returning json objects, which is kind of what I want. Part of having my website is showcasing my own software.

From a human perspective, there is absolutely nothing wrong with my website unless you disagree with my aesthetics.
>>
>>52337873
>sizzle selectors
>operates on DOM collections instead of needing to iterate over sets constantly
>better browser support than you would ever be justified spending time on
>most the utility functions we end up writing over and over
Honestly in 2016 any of those things would pretty much justify jQ
>>
>>52337899
>frameworks
when i write web stuff especially i make it as light and smooth as possible
no way i'm loading some framework on every page just because i'm too lazy to do my job properly.
>>
>>52337902
>From a human perspective, there is absolutely nothing wrong with my website unless you disagree with my aesthetics.
Well humans do use search engines and they need to be able to pull content without firing up a V8. I'm not saying it's never a justified trade off, but the simplicity does cost you something non-negligible
>>
>>52337999
This. Write some functions and classes, you need for the project. Copy from your other projects. Throw in polyfills, if need be. No need for frameworks.
>>
>>52337999
You're not saving lives here, just making websites. And people look for someone who can make websites in an efficient, modular manner and as fast as possible, this is something frameworks provide, but you'll soon realize that. Your argument is something I see spouted often with newbies.
>>
>>52338002
I don't really care about viewer count though, it's more extra information about software I've written and to act as an extra part of my resume.

There's probably a non js alternative, but I suspect that it'd require a lot of html in my backend code, which I don't really like.

>>52337968
Just what a library is meant to do.
>>
File: 1405433610.jpg (34 KB, 443x317) Image search: [iqdb] [SauceNao] [Google]
1405433610.jpg
34 KB, 443x317
What is /g/'s opinion on Go?
>>
>>52337968
i never understand what kind of things people do when they complain about browser support. is it strictly necessary? i have never had a problem.

what kind of selections are you making that you need a framework to do it for you?

i just don't know why you all insist on making everything so complicated all the time.

this is some enterprise level shit
>>
For web designers: Is there such a thing as a good looking website with ad banners?
>>
>>52338078
It has some pain points, but all in all a good choice for performant concurrent backends. Matter of taste, but between C++, C#, Go and Java, I'd pick Go.
>>
>>52338054
>newbies
i am supposed to be insulted?
i'm well aware of how the industry operates now and the kind of shit that gets churned out is just unbelievable. people think pages in the 90's were bad?
i would rather be dead than get back into web dev as a career.
>>
>>52338071
>Just what a library is meant to do.
right, so what's the problem with jQ again? It's a library that does all those things. Seems like a pretty compelling reason to use it.
>>
>>52338078
It's interesting in that it's one of the few truly simple languages left, kinda feels like what Java used to be. Lack of generics is still painful though.

IDK, maybe it's the real "C with objects" language.
>>
I was planning on downloading "Getting MEAN with Mongo, Express, Angular, and Node" but I couldn't find a torrent anywhere so I downloaded "MEAN Web Development" instead. The second book is a year older than the first book so I don't know if I'm making a mistake or not. Am I?
>>
>>52338078
Benefiting from hindsight.

C# doesn't have built in json and unless you take it to the sockets, it's not actually too quick, especially on Windows. Socket programming code can be simple >>52320954 but that's not including the headers or all the sending.

Go has web libraries that do all this for you at about the same speed as C# with sockets, which is brilliant, but more a result from Go developers taking what they learned from c# and java.

It's fast and Go isn't a bad language, so it has my tick. I prefer C# though, because after you "get" sockets it's totally not a problem.

>>52338225
No, I perfectly agree to the point that data binding confuses me, at most it saves one line of code because it's not hard to perform dom selection and then modify whatever on the resultant jQuery object.
>>
>>52338086
>i never understand what kind of things people do when they complain about browser support. is it strictly necessary? i have never had a problem.
map/filter/reduce have spotty support, jQ provides a polyfill. Size calculations are inconsistent across browsers, jQ largely patches it. Native XHR is excessively verbose, jQ provides simple sane defaults. The list goes on...

>what kind of selections are you making that you need a framework to do it for you?
Even something like

$('#foo .bar')


pretty much necessitates sizzle to do in a cross browser fashion.

>i just don't know why you all insist on making everything so complicated all the time.
What's complicated here? It's a library that does things you spend most of your time as a web dev doing. I don't know what coudl be simpler.

>this is some enterprise level shit
nice meme.
>>
>>52338244
>Mongo
>Angular
You are indeed making a mistake
>>
>>52338244
See >>52338419
Mongo is unreliable by design. A database that can not consistently read and write need not exist.
Angular is bloated, over-engineered and has terrible performance.
>>
>>52331698
I'm a professional web dev and from where I'm sitting anyone thinking the present boom is going to last forever is severely delusional, which is frightening because it's a very common opinion.

It's not going to go belly up in the next 5 years, I could see it making 10, but you're not going to be able to retire on it. Which like, that's OK, become a good web dev and you can pivot and become a good something else when the time comes but if you think you can learn some shit this year and rake in that easy cash until the end of time then you've got another thing coming.
>>
>>52332165
I'm too drunk to give you a good answer but I will tell you this is a bad idea, it results in a ton of repaints in every browser I've ever tested it on. In general pushing flow around during in animation is going to fuck performance.
>>
>>52333971
>read "the good parts" by crockford
The good parts is really poor introductory material. It basically teaches a dogmatic approach that generates the kind of "you're stupid because crotchety old crockford says so" devs you see shitting up this thread from time to time.
>>
Are all of you self taught? How long did it take to learn? Employer is paying me to get a CS degree but I'm curious how long it takes to learn on your own, or even with a degree.
>>
>>52339434
>I'm a professional web dev and from where I'm sitting anyone thinking the present boom is going to last forever is severely delusional, which is frightening because it's a very common opinion.

Care to elaborate on this?
>>
I want to start a blog. I'd like for it to be my own unrestricted website so I don't have a ton of red tape to deal with. But despite generally being good with computers, I don't know enough about coding to do this on my own without losing my hair. So could you guys point me in the right direction, or if there's anyone who would like to partner with me, I'd be happy to share any ad revenue the site generates.
>>
>>52340047
>Care to elaborate on this?
Web developers are in high demand today, even a mediocre programmer with the right words on their resume can pull a lot of money. The same is true for most people with "software engineer" or equivalent as their job description, but web devs are specially elevated even beyond that.

We've seen boom/bust cycles in tech before, we weren't fully out of the last great bust a decade ago. Web devs make good money today but there's going to come a point where either the economy compensates for the wealth in that sector (produces more programmers, we all have to deal with actual competition again) or out labor becomes devalued (demand does not increase, our work is worth less). It's basically inevitable with the level of wealth/attention this field generates.

And it's a good thing, we all have some sweet years to earn impressive incomes for relatively little work. But it's foolish to think it will last forever, sooner or later web dev is going to stop being the hot thing, maybe DB design is going to really take off for some reason, whatever, the point is that it's a great skill to have you you better make plans for the time when it isn't because nothing in this field lasts forever and if you can't pick up new tech on a dime then you're in for a world of hurt.
>>
File: emale.gif (978 B, 116x116) Image search: [iqdb] [SauceNao] [Google]
emale.gif
978 B, 116x116
>>52340295
ghost.js or wordpress depending on your format. Do an image search for examples of each.

I like ghost for its simplicity in presentation and not being written in php.

I like wordpress because of a wealth of plugins. While both are highly customizable, wordpress is significantly more popular and therefore has more support and content written for it.

I want to administer servers for people writing blogs, but haven't had any bites amongst my personal contacts. Pic related.
>>
File: 1447661067683.jpg (23 KB, 499x430) Image search: [iqdb] [SauceNao] [Google]
1447661067683.jpg
23 KB, 499x430
How to redirect all request from [anything]mysite.com/[anything] to https://www.mysite.com/[anything] using .htaccess?

I tried lots of rules and what they do is redirect all the requests to https://www.mysite.com/. However, I want the stuff after domain name to be accounted for as well. For example, if someone goes to mysite.com/directory/, they would be redirected to https://www.mysite.com/directory/, and not https://www.mysite.com/.
>>
File: cloudflare.jpg (1 MB, 2821x1424) Image search: [iqdb] [SauceNao] [Google]
cloudflare.jpg
1 MB, 2821x1424
Cloudflare question:
Does CF add a significant amount of latency to an http request, particularly when it has to go to the origin server to fetch and cache a response for the first time? I'm talking about 10kB sized and smaller responses.
>>
>>52342517
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC]


what about subdomains?
should all redirect to your www subdomain too?
or www.my.example.com/my.www.example.com

be more specific
>>
File: 1450118781950.jpg (365 KB, 750x725) Image search: [iqdb] [SauceNao] [Google]
1450118781950.jpg
365 KB, 750x725
>>52342978
Subdomains should redirect to https://www.subdomain.sitename.com/.

Thanks for the help by the way. Have a rare Pepe.
>>
>>52343197
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(.*)\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.%1.example.com/$1 [L,R=301,NC]

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC]
>>
>>52343197
>>52343406
actually forgot to add the redirect to https for subdomains
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^(.*)\.example\.com$ [NC]
RewriteRule ^(.*)$ https://www.%1.example.com/$1 [L,R=301,NC]

RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301,NC]

RewriteCond %{HTTP_HOST} !^www\..*\.example\.com$ [NC]
RewriteCond %{HTTP_HOST} ^(.*)\.example\.com$ [NC]
RewriteRule ^(.*)$ https://%1.example.com/$1 [L,R=301,NC]
>>
>>52343197
>autismbux can afford you a high-rise apartment in a major metro area
I presume Wojak was standing at ground zero.

>>52340314
Good programmers will always be in demand for proper jobs that actually produce value for society even after the VC capital for companies trying to make the next fuckbook disappears. Read about the last dotcom bubble; not every programmer lost their job, and today the web is a much more integral part of our lives than its every been before.
>>
File: 1440878618134.jpg (185 KB, 468x500) Image search: [iqdb] [SauceNao] [Google]
1440878618134.jpg
185 KB, 468x500
Is it usually possible to install newer versions of Python on shared hosting as long as one has SSH access?
I have shared hosting with GoDaddy, and I checked the Python version with SSH, and it's 2. I want to install Python 3. Would that be possible?
>>
how do you guys feel about structured learning versus patchwork learning on your own?

i've tried working my way through tons of different courses that always end up boring me to death so i put them on hold to go work on personal projects where i spend most of my time googling random stuff trying to different things to function properly. i enjoy this for the most part.

is it necessary for me to force myself through some courses no matter how boring their are just for the fundamental knowledge they present or is tinkering with personal stuff, learning things as i go on them enough?
>>
Okay so this is what I have right now. When I hover over [steam], it makes [alt] appear

        <div id=steam>
<ul>
<li>
<a href="steam link 1">「steam」</a>

<ul>
<li><a href="steam link 2">「alt」</a></li>
</ul>
</li>
</ul>
</div>


#steam ul {
list-style:none;
padding-left:0;
}

#steam ul li ul {
visibility: hidden;
}

#steam ul li:hover > ul {
visibility: visible;
}


Two questions..

1) When I hover over the space taken up by [alt], it shows, even if I am not hovering over [steam]. I don't want the hidden link to be clickable or seen without hovering directly over its parent link. How can I do this?

2) Is using lists the best way to achieve this effect? Can you use selectors for two different ids?

Something like:

#steam2 {
visibility: hidden;
}

#steam:hover > #steam2 {
visibility: visible;
}


It feels like there should be a way easier way to do this without all that space used up by making a list and sublist.
>>
>>52345074

change the hover to the hyperlink rather than the list?
>>
>>52345074

you want to use display:block not visibility

#steam ul li ul {
display: none;
}

#steam ul li:hover > ul {
display:block;
}
>>
>>52345181
>>52345204

here's another example, depending on what you are doing

#steam ul li ul {
display: none;
}

#steam ul li a:hover + ul {
display:block;
}
>>
>>52345225
>>52345204
Okay using display:block does give me the desired effect! Thanks! Now I'm just wondering if there is any way to make the HTML simpler like maybe keeping them in the same list or something like >>52345127 said?

Would this work?

<div id=steam>
<ul>
<a href="steamlink1">「steam」</a>
<li>
<a href="steamlink2">「alt」</a>
</li>
</ul>
</div>


#steam ul li {
display:none;
}

#steam ul:hover > li {
display:block;
}
>>
>>52345259

<div id="steam">
<ul>
<li><a href="steamlink1">「steam」</a></li>
<li><a href="steamlink2">「alt」</a></li>
</ul>
</div>


#steam ul li:nth-child(2) {
display:none;
}

#steam ul:first-child:hover > li {
display:block;
}
>>
>>52345333
Thanks! This does look a lot better.

One last question.

* {
margin: 0;
padding: 0;
border: 0px hidden;
}


I used this at the start of my stylesheet thinking it would reduce the size of the selectable areas for my links, but they all this have like 20px of blank space near them that you can use to click the links. How do I get rid of this space? I wasn't really sure how to succinctly describe it so Google didn't really help.
>>
>>52345403

in what way anon? the only whitespace i can see (which occurs at the beginning and end of the hyperlink) is due to the characters you are using to encase the text
>>
>>52342584
It usually reduces it.
>>
>>52344348
>GoDaddy
You fucked up.
>>
File: 10-93149.jpg (80 KB, 430x430) Image search: [iqdb] [SauceNao] [Google]
10-93149.jpg
80 KB, 430x430
>>52338078
master race. I'm still at the top of peak stupid as far as my learning of Go is concerned so I'm the guy who spams gophers and whales in every thread. Really seems like a fun language and has been the best experience so far as I'm still fairly new to programming.

My progression has been PHP->C#->C++->Go, C++ being the most interesting language ever since I picked it up to learn graphics(think opengl matrix shit), PHP being the most resented but only because of the industry. I never really got the need for C#.
>>
>>52345333

just a fix to that one

#steam ul:first-child:hover li:nth-child(2) {
display: block;
}

this will only unhide the second link, just incase for whatever reason you have more links that you want to stay hidden
>>
File: SlMX8i9.png (207 KB, 1280x977) Image search: [iqdb] [SauceNao] [Google]
SlMX8i9.png
207 KB, 1280x977
Fucking codeacademy.
What are other great resources to learn angularjs with?
>>
>>52345922
>learning angularjs
It's deprecated didn't you know?
>>
>>52345967
Fuck you.
Place I'm interning at is using it.
>>
>>52345984
It literally is deprecated though, angular 2.0 is a complete rewrite
>>
>>52346010
as if a company is now rewriting everything from scratch because of that.
>>
>>52346010
Okay, Where do I learn that? Tutorialspoint and that one phonecat tutorial on their website feel too hand holding.
>>
>>52346010
Do you know anything about angular at all? They're still up in the air about like 50% of the syntax in Angular 2.0 as it's in beta. They havent even decided how the syntax for directives the driving force of the language is going to work, or who exactly they're binding controllers to them.

Jesus christ this thread is infuriating.
>>
I'm having some major issues with the fucking Twitter embedded feed widget js and its CSS.

<div id=twitter>
<ul>
<a href="https://twitter.com/mytwitter">「twitter」</a>
<li>
<a class="twitter-timeline" href="https://twitter.com/mytwitter" data-widget-id="686184374199431169" data-chrome="transparent noborders noscrollbar noheader nofooter">Tweets</a>
</li>
</ul>
</div>

a.twitter-timeline {
font: normal 12px/18px Helvetica, Arial, sans-serif;
color: #ffffff;
white-space: nowrap;
}

a.twitter-timeline:hover,
a.twitter-timeline:focus {
background-color: #ffffff;
}


Literally does not matter what I change in the stylesheet. The only time anything changes is when I use the data-chrome attribute in the HTML.

Have no idea how to change font colors, sizes, anything.
>>
>>52337196

Best practice in JQuery would be to declare it as an object so you can manipulate it later on-- since it's an overlay it's most likely going to have an on('click') event that's going to clear it as well as need to be able to call .hide() or .remove().

It's more efficient to store the object in memory than to run JQuery's dom traversal when it's time to deal with it by selecting it by ID.
>>
>>52346167
post a jsfiddle
>>
>>52346167
Nevermind I found some tool you can use to customize it all with a gui.
>>
>>52346034
>>52345984
>>52345922
Okay.
Fuck that shit.
How come stoopid() shows up in plain html while it doesn't in input field?
http://pastebin.com/smHpeR2n
>>
Hey /wdg, what should I use for the client-side?
I'm using Go as a back-end language.

I've used Angular, but it seems that it is pretty dead, and I didn't really like it personally.
Now I've tried React and it seems nice but it's only the view and I think the JS tooling is complete shit. I've spend way more time getting my Package.json/Webpack config working, then actually working on a React project. And it's still a bit shaky: will adding Redux or React-Router break everything? I don't know, I never know, because normal readable errors don't seem to exist in the React world.
>>
how about simplicity

steal a html template from somewhere and adapt it

and use requirejs for simple js requirements
>>
>>52346537
>>52346468
>>
I spent over 3 hours trying to solve a CSS issue.

>tfw not cut out for this kind of work
>>
>>52346734

thats what the web console is there for
>>
How do I increase the size of an element while keeping the visible portion of that element the same size? I basically want to just increase the white space tied to that element.

I have a javascript widget I am using that will only go as wide as the parent element. It is part of a list so that I can use a hover attribute for it so the only thing I can think of is to make the parent element bigger.
>>
>>52346468
I write my own mini framework.
>>
>>52346952

margins
>>
>>52346978
https://jsfiddle.net/2m7ng8sd/

Despite how much I change the margins of both the widget's element and parent element, it won't get any wider. Setting a width in the widget's anchor tag doesn't do anything either.

When you hover over the Twitter link, you see the widget pop up, but there is a ton of blank space to the right of it that I want to use to make the entire thing larger and easier to read.

I'd also like to make it use a certain percentage of screen space so that its consistent across resolutions but I'm not sure how to do that either.
>>
>>52347135
padding?
>>
>>52347135
Wat.

I don't get what you're asking, what widget? There's just a link going to twitter.
>>
>>52347135

it's not a very flexible way of doing things anon, all these position absolutes and left right values are going to be a real pain in the dick
>>
>>52347135

>>52347395
this, your entire layout is already flawed.
>>
>>52319053
First time posting here.

How do you guys organize your files? Do you have staging environments? Do you use vagrant? Or other development environment isolation tools?
>>
>>52347388
Try this I guess? Shows up perfectly fine for me.

https://jsfiddle.net/Lutbe3mg/

I guess its just not possible for the widget to get wider or taller than this? Once I give its parent element about 300px of padding on the right side, it just stops there and doesn't get any bigger.

>>52347443
>>52347395
Yeah I know, fixing this last bit was troublesome because of it but this is the last thing I wanted to make work before I redid all of the positioning.
>>
>>52347588

the reason it wont get bigger is the position:absolutes you are using
>>
>>52347588
My adblock blocked twitter, that's why it didn't show anything.

you can increase the width by simply giving the parent li a width.
#twitter ul li { width: 600px; }

the widgets iframe has its width set to 100% of the parent.
>>
>>52347639
Oh okay well I'm redoing all that any ways. Is position:static what I should be using since I don't ever plan on having this page scroll?

>>52347657
Oh awesome. Thanks!
>>
>>52346537
It's going to be a SPA. Don't know if that's really feasible/manageable if I would do that completely on my own
>>
I googled "how to learn react" and etc., and it seems like every person recommends a different resource than the last. I just downloaded react.js essentials by artemij but I honestly have no idea if I should be using this or something else. One thing I noticed is that this book is 200 pages long while a lot of the other resources people recommended were just a single page website. Am I doing the right thing by reading this or should I just pick something else?
>>
>>52348251
Well, a 200 page book seems more comprehensive than the other sources you found. Like with any book, however, don't limit yourself to that content. Read it, but work with other sources as well.
>>
>>52337323
>>52337345

>I've been in these threads for a good while now and I've never seen any in-depth discussion about Wordpress. Most people here are either front-end or they focus more on specific languages rather than platforms like WP.

Yeah, believe me. I'm only doing this because my boss asked me to.

>My opinion of WordPress is that its not hard to write your own blogging system in whatever language you want, which begs the question why serious programmers would use it. Someone tech savvy, but not a programmer, might like it so they can tweak the script, but they'd probably enjoy mezzanine and python more.

The funny thing is, I could write the same functionality into Django in 10 minutes.
>>
>>52348251
Welcome to fucking JS, where even some retards thought it would be a good idea to bring Node to embedded development.
Everyone has it's own idea of what 'good' is and how it should be implemented.
Which more or less always results in writing a lot of configuration files for different tools, without really knowing what is really happening. Except if you really want to learn the tools, and you should, but when the next train arrives it's back to starting point.

I would suggest going with as little tooling as possible, which is a problem since React uses JSX and Webpack configuration files are horrible.
>>
>>52347459
I develop with Django. I can basically organize my files however I like. I just use simple virtualenvs to keep my work environments separate from each other.
>>
Speaking of module systems/bundlers, anyone here have thoughts on Systemjs? Moved a project over to it and pre-compiling each module separately with Babel. It looks fine so far and has the added bonus of becoming the living standard in a few years.
>>
Alright I redid basically everything for this without using absolute positions like you guys suggested and it was a lot easier than the way I was doing it before.

My only question is how to make the right side of the drop down collage align with the link above it, rather than the left side and going off screen and forcing a scroll and causing all this white space in the nav <ul>. I tried "right: 0;" but it did nothing.

https://jsfiddle.net/oryfjscj/1/
>>
>>52342584
Yes, it does add some latency on dynamic requests (things it can't cache) but their data centers are distributed so it's probably like a 25% increase (pulling that number out my ass but it's guaranteed to be less that doubling request latency unless you live inside your datacenter).

You usually make up for it on latency saved when serving statics.
>>
>>52349689
I hope you use virtualenvwrapper

It makes it easy to manage virtualenvironments

Virtualfish for Fish users
>>
>>52327799
PHP is not secure.
>>
File: 1452413512992.jpg (110 KB, 720x960) Image search: [iqdb] [SauceNao] [Google]
1452413512992.jpg
110 KB, 720x960
Hi,

what is the point of a "data-structure server", e.g. Redis?

Thank you
>>
>>52343548
>not every programmer lost their job
For sure, that's not what I was trying to say. My point is that webdev is something you can make a professional level salary in after a 6 week bootcamp or something (you'll be shit at your job but not shit enough to get fired apparently) and people with talent can basically sleep at their desks and get called "rockstars". This clearly isn't going to last, there will come the day when we need to actually start earning our income again, which is fine because I don't want to spend my life being horrendously overpaid to do mindless stuff that's been done a billion times before.
>>
>>52350795

Redis is usually good at storing cache. This could be saved sessions with simple key value strucutre (usually session: session_hash_id). Its very fast in processing these types of datastructures.

For example, you could use it to manage game sessions and have session data be stored on the server instead of local cookie.
>>
>>52320078
>C# is faster
>easier to organise (into MV* style projects, like a pro)
>and nuget means there are more packages.
The fact that nobody called out this post makes webdev the weirdest general thread on /g/.
>>
>>52344348
Do you have root (like in a VPS scenario) or just a delevated account? If the former then yes, if the latter then I think you're going to need to build from source, not sure how involved it will be when dealing with dependencies.
>>
>>52320078
I wanna learn C# soon for performance.

Any good tutorials?
>>
>>52350833
Mhm,

any other real-world usage examples?

Also, can it parse "nested" data structures? Because some tutorial told me to serialize my stuff into JSON and I got confused why not just throw something native in there.
>>
>>52350884
http://www.asp.net/get-started
>>
>>52350886
Ive not had any extensive Redis work as of yet, but Im sure that wouldnt be an issue. Refer to the manual
>>
>>52350946
Whoa sorry, I though you meant C++ or Objective C.

Im not learning that C# since its so tied to windows
>>
>>52351023
it isn't.
https://github.com/aspnet/home
>>
>>52350795
>>52350833
>Redis is usually good at storing cache

Redis is a lot more than a cache though. One of its biggest strengths is that it's entirely synchronized so you can N processes banging on it or reading simultaneously and you'll get non-transactional (aka fast) correct behavior.

It also has some pseudo-transactions (not ACID but really good considering the performance relative to every ACID transactional system you've ever seen)

Some of its data structures (hyperloglog, sorted sets, the geospatial stuff) don't have a good/fast implementation in many languages so it's a cheap way to get those.

It's pub/sub system is better than 90% of what passes for interprocess communication.

>>52350886
>Also, can it parse "nested" data structures?
No, as far as redis is concerned the only thing you store is strings. If you need to query against the contents of objects stored in redis then you need a relational database, redis solves a different problem.
>>
>>52333839
>React is master race.
Goddamn right.
>>
>>52351065
OF course. Ive only had to use it for a cache, but the key is it fast at processing in memory data sets.

And pub sub is amazing. I use it locally on my raspi for local notification board
>>
sup niggers

my domain hosting provider has an SSL option which i have enabled, and it works when you add the "s" in https://

but the question is, what do i write in my HTML document to force https:// if someone goes to my website from an http:// link?
>>
>>52351468
you need to do that on the server, not on your site.
what software is it running on? apache, nginx, iis?
>>
>>52322966
How do you usually organize your jquery to make it more organized?
>>
>>52321273
Is domain pointed to names ever or a record? What do you mean setup hosting service? What hosting?
>>
>>52321392
New php is good, look into using a framework like laravel
>>
>>52325248
Because clients don't know. So as long as you build it at the end of the day it doesn't matter what framework you dicked around with that day
>>
>>52351518
Not who you were responding to (I think MVVM frameworks are exactly what we need in front end dev and UI designers the world over could learn from a more declarative approach) but you keep jQ-only codebases organized the same way as anyone else does. Split things into modules (you can get by with closures and injecting module names into the global namespace if you're stubborn or you can use require.js if you know what's good for you) if you go for an OOP approach make sure you avoid global selectors (i.e. this.container.find('.foo') as opposed to $('.foo')), stick to DRY principles, prefer returning values to mutating arguments, just the same things you do everywhere else.
>>
A person testing my website says that our sidebar is always open. This is a big problem, since it obscures most of the website on mobile.

The problem is, this user is on Windows Phone 8.1. I have no way to acquire a similar device to test on.

How the hell am I supposed to fix this?
>>
Alright, be honest /wdg/ is web development hard to get into? I've been contemplating to start it cause, It seems cool and Id like to make my own website
>>
>>52352298
Browserstack I would assume has it. Otherwise hunt down one of the 5 people with a Windows phone
>>
>>52352298

browserstack.com

use the free trial
>>
Node question:
So of course you are supposed to export only a constructor from each module and avoid any implicit state.

Problem is that my module is crudely converted from code intended for the browser and therefore has lots and lots of implicit state. Far too much for me to rewrite it, especially since I'm not the one who wrote it originally.

So my question is, how can I still have multiple "instances", as it were, of this module? Say it's car.js. Ideally I could do
var car = require('./car');
var my_car = new car.Car();

Since I can't do that, what should I do to have multiple separate Cars?
>>
>>52352415
>>52352418
Thanks.
>>
>>52352420
You really should rewrite it to keep state out of the module level. I guess you could wrap the whole module in a function and return that, so the former "static" values become part of the closure and get recreated on every invocation but that's not a very good idea.
>>
>>52352533
>You really should rewrite it to keep state out of the module level.
Soooooo not happening unfortunately. It's hundreds of lines of dense logic with tons of top-level variables and the few comments are in Chinese.

>I guess you could wrap the whole module in a function and return that, so the former "static" values become part of the closure and get recreated on every invocation
>but that's not a very good idea.
Okay, could you explain the main downsides there? If they're bad enough, I have an alternative idea (segregate this portion into a separate project and call it as a separate process).
>>
>>52352608
>Okay, could you explain the main downsides there?
Well if it to work it assumes the top level variables aren't actually references to something truly global. So like if one of those top level vars is a global DOM selector then it's probably not going to work because each "instance" you make will hold a reference to the same selection. Likewise if the code grabs a reference to a file instead of opening it directly or something you'll have the same issue. And lastly if there are references in it that rely on global vars (e.x. window.whatever) then it's possible lexical scoping it with the wrapper will break those refs.

But I mean just give it a shot, if it does work then the only downside is you've got a blob of ugly code with Chinese comments, which you're going to have no matter what if a refactor is a no-go
>>
>>52352866
Fortunately none of those things apply, it's pure business logic. Thanks anon!
>>
>>52349550
>Except if you really want to learn the tools, and you should, but when the next train arrives it's back to starting point
And that's also why I don't always fuck with frameworks or libraries unless I have to.
>>
File: Untitled.png (292 KB, 2089x909) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
292 KB, 2089x909
I've been trying weeks to set up sublime + livereload.
I know I can use Brackets but I don't like my whole IDE freezing while I'm half way thorugh wrigint a loop.

can anybody provide a portable zip of sublimetext + livereload or at least give me a hand here?
>>
File: Untitled.png (456 KB, 970x720) Image search: [iqdb] [SauceNao] [Google]
Untitled.png
456 KB, 970x720
Can /g/ suggest a good resource for learning mysqli on PHP? The one provided by my school sucks dick.
>>
How do I get a drop down horizontal nav?

        <ul>
<li><a href="#">Home</a><li>
</ul>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>


</ul> <!end inner ul -->
</li> <!--end main li-->
</ul> <!--end main UL -->

</div> <!--end navMenu -->
</div> <!--end wrapper div -->
>>
>>52353715
not related to your quesiton, but line 5 - you are missing > at the end of closing </script> tag
>>
>>52353907
I pasted it incorrectly
<div id="wrapper">
<div id="navMenu">

<ul>
<li><a href="#">Home</a><li>
</ul>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>


</ul> <!end inner ul -->
</li> <!--end main li-->
</ul> <!--end main UL -->

</div> <!--end navMenu -->
</div> <!--end wrapper div -->
>>
>>52354050
Oh shit, that might be why certain browser users are complaining that it doesn't work
>>
>>52354244
I think that in sublime you can type <script and then press tab, and sublime should auto-complete tag.
>>
>>52354391
Somewhere along the lines I must've deleted it, thanks.
>>
just friendly reminding everyone to read it at least once a week

http://motherfuckingwebsite.com/
>>
>>52354105

your code is fucked senpai
>>
>>52354105
sixth line you've closed </ul> before you opened another. remove backslash
>>
>>52354682
>
<div id="wrapper">
> <div id="navMenu">
>
> <ul>
> <li><a href="#">Home</a><li>
> <ul>
> <li><a href="#">link item</a><li>
> <li><a href="#">link item</a><li>
> <li><a href="#">link item</a><li>
>
>
> </ul> <!end inner ul -->
> </li> <!--end main li-->
> </ul> <!--end main UL -->
>
> </div> <!--end navMenu -->
> </div> <!--end wrapper div -->


Remove the back slash and leave it like that? Still not working
>>
>>52355020
><li><a href="#">Home</a><li>
should be
><li><a href="#">Home</a>

that should work
>>
>>52355056
You forgot the closing </li> tag.
>>
>>52355078
i didn't it is closed on the line 13 >>52355020
>>
>>52355056
>>52355078
Cool that gave me one the other link element where I wanted, now I'm trying to put one more on top of home to eventually drop down, but they keep getting placed to the left
<div id="wrapper">
<div id="navMenu">

<ul>
<li><a href="#">Home</a>
<ul>

<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>


</ul> <!end inner ul -->
</li> <!--end main li-->
</ul> <!--end main UL -->

</div> <!--end navMenu -->
</div> <!--end wrapper div -->


I havent gotten to the css yet
>>
Learn Jade.
>>
>>52355094
not me
>>
>>52355146
they should be shifted to left, because it's list within a list. what are you trying to make? I don't understand
>>
>>52355296
I want 4 links in line with each other and 2 to appear when I hover over home
>>
>>52355378

Then nest more <li> tags within Home. Wrap all within the <ul>.
>>
>>52355458
want two link items to appear when I hover over home. Where do I nest them?

<div id="wrapper">
<div id="navMenu">

<ul>
<li><a href="#">Home</a>
<li><a href="#">link item</a><li>
<ul>

<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>
<li><a href="#">link item</a><li>


</ul> <!end inner ul -->
</li> <!--end main li-->
</ul> <!--end main UL -->

</div> <!--end navMenu -->
</div> <!--end wrapper div -->
>>
File: 1418862517019.jpg (78 KB, 380x480) Image search: [iqdb] [SauceNao] [Google]
1418862517019.jpg
78 KB, 380x480
I made a script which makes a chiptune out of your git contributions graph. Paste into console of your open git profile page and uprote please

((audioContext) => {
'use strict';
const levels = {"#eeeeee": 440, "#d6e685": 660, "#8cc665": 990, "#44a340": 1485, "#1e6823": 2227.5};

const weeks = ([].slice.call(document.getElementsByTagName('g'))).slice(1).map((week) => {
return ([].slice.call(week.getElementsByClassName('day'))).map((day) => {
return levels[day.attributes.fill.nodeValue];
});
}).map((bar) => {
return createOscillators(audioContext, bar);
});

let i = 0;
for (let oscillators of weeks) {
((j) => {
setTimeout(() => {
for (let oscillator of oscillators) {
oscillator.start(0);
setTimeout(() => {
oscillator.stop();
}, 50);
}
}, 100 * j);
})(i += 1);
}

function createOscillators(context, levels) {
return levels.map((freq) => {
const oscillator = context.createOscillator();
const gainNode = context.createGain();
gainNode.gain.value = 0.1;
oscillator.type = 'sawtooth';
oscillator.frequency.value = freq;
oscillator.connect(gainNode);
gainNode.connect(context.destination);
return oscillator;
});
};

})(new AudioContext);
>>
>>52351468

Learn which web server your host is running and then find/create a rewrite rule to rewrite all requests to https.
>>
Anyone using Scala? How do you feel about the language, its community, and available libraries?
>>
>>52350853
Author of the post you quoted here, called it out.... How? C# is faster than most other languages typically used for web and nuget is easy as fuck and has absolutely everything.

At the moment, my library benchmarks faster than Go and slightly faster than node. That's really appealing for some people.

>>52351023
I tested my library on mono, the c# runtime for Linux. You're right, ASP projects don't always work when you import them to monodevelop, which was one of the reasons I developed it in the first place.

>>52350884
Tutorials to do what?

>>52351518
Have a folder called "js" and put your JavaScript files in there, a folder called css and etc. What I meant was that everything view related is going to be html or JavaScript, everything logic or "model" related is going to be in your backend code. There's already separation of code going on here, they're linked with Ajax requests.
>>
what editor do you use? post screenshots
>>
>wow promises are really cool
>they're neater, faster, and make more sense
>maybe we can convince the jquery fags to switch to these

>in the end you still have to nest anonymous functions to pass extra arguments along
Fucking goddammit
>>
Is Django suitable for a simple website with a database serving static HTML pages and JSON?
>>
File: neat.gif (47 KB, 450x510) Image search: [iqdb] [SauceNao] [Google]
neat.gif
47 KB, 450x510
>>52345984

Same, I'm using an internal angularjs framework. Pretty cool stuff.

>>52346010
If you can't pick up languages quickly you're a faggot. Having to learn new things is not that big of a deal. Usually it should take you 2 weeks to pick something up and hit the ground running with it. The concepts still apply as well.

Lets not pretend that the web isn't a jumbled up mess that's hacked together. Being a web developer means knowing how to pick up tools to handle that mess.
>>
>>52356311
>faster than go and slightly faster than node
I'll need some source on this. Also any go webserver should usually run faster than node simply because native > JIT
>>
>>52358506
>>in the end you still have to nest anonymous functions to pass extra arguments along

Yeah I don't understand the hype either...
>>
>>52353778
>mysqli

holy shit your school is dated as fuck. http://php.net/manual/en/book.mysqli.php
>>
newbie here...

i'm having a hard time remembering basic syntax layouts. i'm guessing this is something to be expected but for how long?

also I feel like I completely suck when it comes to design work. how do I improve?
>>
File: 1447288339850.gif (3 MB, 350x349) Image search: [iqdb] [SauceNao] [Google]
1447288339850.gif
3 MB, 350x349
How long does it usually take to start seeing results after Search Engine Optimizing your site?
>>
>>52359513
>he fell for the SEO meme
If this is for work then just tell your boss you followed the latest online hipster tips for it and you're fine

If not, fucking spend your time on something that matters
>>
>>52359298
Trust me, Node opens and closes connections faster than Go. Actual execution is about the conspiracy of Node, because you're right, JavaScript execution isn't terribly quick.

>node simply because native > JIT
The networking code of Node is written in C++. It only scripts with JavaScript.

>I'll need some source on this. Also any go webserver should usually run faster than
Kind of difficult because we're talking about my own web library here, but it's really just a socket with a header parser.

If you have monodevelop or visual studio, try it yourself
https://www.nuget.org/packages/FAP.dll/
Install-Package FAP.dll


I do have a benchmark on my website, but its old and from when I was using a tcpclient instead of sockets. It was reasonably quick on Linux, but horribly slow on Windows. To compare, my library now benchmarks at around 250us, again node which is just over 250us and Go which is about 320us. Doesn't seem like much, but it translates to heaps more requests per second.
>>
Is it enough for a front end developer to learn just jQuery? I know basic JavaScript but I can't for the life of me begin to use it in practical applications.
>>
can someone give me a tip on some more technical stuff?

I have a client looking to host educational non-profit video content. they've been using youtube but they're looking for a way to keep the videos private and host them on their own server.

I can handle creating an HTML5 player for them w/ flash fallback, but I need a place to store the actual video data that is cheap and reliable.

basically a CDN where I can just upload files and have a URL to pull down into a player on the normally-hosted site (on a cheap VPS).

can anyone give me a ELI5 protip? I need upwards of 1TB of storage and at least 1TB of monthly bandwidth (with the option to go over and just be billed more).
>>
>>52359504
anyone?
>>
File: smokey.png (32 KB, 800x600) Image search: [iqdb] [SauceNao] [Google]
smokey.png
32 KB, 800x600
>>52360049

you'll learn over time. look at example code on stackexchange, make lots of shit... read lots of tutorials. maybe learning the origins of markup (XML) and basic code (javascript or C) will help.

as for design, check out >>> /gd/ for people of your skill level, or check out dribbble or other sharing sites (not deviantart) and follow people you like. try other networking sites like ello.co as well. just surround yourself in the shit and you'll pick up hints and ideas and eventually get better.
>>
>>52360113
>>52360113
>make lots of shit

so as I progress, take what i've learned and apply it to new projects?

wish there was an easier way to figure out what kind of projects I would want to work on.
>>
>>52359923
Depends.

If you're aiming for 25k a year salary then sure.
Anything above that and you better start learning AngularJS with ReactJS, after you got a good idea and feel comfortable with vanilla JS.
>>
>>52360400
make something dumb just to do it. like a wordpress theme. in fact, immersing yourself in wordpress and learning the functions is a good way to learn php and APIs.
>>
>>52360610
isn't there some programming project roll image?

if anyone could share that image that would be nice.
>>
>>52355947

it's fucking garbage
>>
>>52359923
Depends, a lot of problems that angular solves can be just as easily solved by a skillful dev with just jQuery. That being said, someone with that skill is probably learning big boy languages and only in webdev for backends/databases.

>>52360516
Pfft, angular is only good for SAPs, and react isn't needed for every project. JavaScript devs talking themselves up again.
>>
Is HHVM a meme?

It seems very CPU-intensive and in most cases it's only marginally faster than just using PHP 7 FPM.
>>
>>52361168
Basically, whatever gets php performing faster. Realistically, it could be better to just use a different language.
>>
>>52361168
Basically what >>52361187 said. If you want performance, switch to a different language, like Go, C#, JS or Java.
>>
File: 1427209340066.jpg (37 KB, 229x238) Image search: [iqdb] [SauceNao] [Google]
1427209340066.jpg
37 KB, 229x238
>>52361479
>performance
>C#, JS or Java.
>>
>>52361518
Like it or not, those are direct competitors. I assume you generally wouldn't want to use C/C++ for webdev.
>>
>>52361539
You know, there is absolutely nothing wrong with fastcgi, in the end you're still just returning strings. I'd only not use C++ because C# has things like gzip and multiple Json serialisers and can generally do the little things in fewer lines of code without sacrificing too much speed.
>>
>>52361759
Nothing at all. However, I prefer the separate web server with optional reverse proxy approach.
Thread replies: 315
Thread images: 23
Thread DB ID: 399662



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

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

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the shown content originated from that site. This means that 4Archive shows their content, archived. If you need information for a Poster - contact them.
If a post contains personal/copyrighted/illegal content, then use the post's [Report] link! If a post is not removed within 24h contact me at [email protected] with the post's information.