[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
/wdg/ web development general
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

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

Thread replies: 230
Thread images: 17
File: best web developer in nigeria.jpg (89 KB, 700x562) Image search: [Google]
best web developer in nigeria.jpg
89 KB, 700x562
Death to PHP

> IRC
#/g/wdg @ irc.rizon.net
Web Client: https://www.rizon.net/chat

> Tutorials & Resources
https://www.codecademy.com/ — Learn to code.
https://www.bento.io/tracks — Start here if you’re new.
http://www.theodinproject.com/ — Alternative to above, focused on Ruby on Rails back-end.
https://developer.mozilla.org/en-US/Learn/Choose,_Install_and_set_up_a_text_editor — Choosing a text editor.
https://libraries.io/ — Discover new open source libraries, modules and frameworks.
https://www.coursera.org/browse/computer-science — CompSci courses.

> Getting Hired
https://pastebin.com/4YeJAUbT/ — NEET Guide to Web Development
http://elliotec.com/how-i-got-a-job-in-web-development/

Previous thread >>51494673
>>
ayyy we're back
>>
File: Untitled.png (75 KB, 812x602) Image search: [Google]
Untitled.png
75 KB, 812x602
Does anybody know how I can remove these spaces? This is driving me crazy, they only appear when I add the names.
>>
>>51515097

Try setting the bottom margin to 0.
>>
>>51515097
It's probably the border of your bingo tables. Color those first to see.
>>
>>51515140
default is 0 so no since I checked, thanks, I shoul've specified.
>>51515148
Colored them, still the same space
>>
set margin to negative
>>
Explain to me why I would use any of the following:

Grunt
Capistrano
Jenkins
Varnish
Unicorn
LESS - SASS seems better in every regard
HAML
>>
>>51515474
research yourself you lazy shit
>>
Stupid question but this but how do I get shit on my page written in latex?

Like on Wikipedia and /sci/
>>
>>51515097
put them in the same print_r
>>
>>51515097
Right click > inspect element

Play with the css.

You could probably move it down with a negative margin
>>
Now that this software is funding terrorism, what are some good alternatives??
>>
>>51515474

>Grunt
Know that annoying series of commands you have to run when building / testing / deploying your project? Automate that shit.
(Gulp is better tho.)

>Capistrano
If you need to ask what you'd use it for, you probably don't need it yet.

>Jenkins
For when you're too poor for TravisCI.

>Varnish
Hur dur what is easy-to-set-up caching.

>Unicorn
Assuming you're referring to the W3C tool. Make sure your website isn't a complete crock of shit in only one click. Keep your shitty offshore / junior devs in line.

>LESS
Agreed - sass is better.

>HAML
Personal preference. Some people like templating engines. Whatever.
>>
is there any way to test what a webpage will look like on ios mobile without just looking at it on an iphone? cross browser dev tools?
>>
>>51515715
why funding terrorism?
>>
>>51515947
Something like this doesn't work?
http://browsershots.org/
>>
grunt.registerTask("langCompare", function() {
var arr = grunt.file.expand(['./language_files/json/*']);
for (i=0; i<arr.length; i++) {
var path = arr[i],
file = grunt.file.readJSON(path),
json = {};

for (k=0; k<file.length; k++) {
var area = file[k].area,
lang = file[k][langCode],
key = file[k].key;
if (!json[area]) {
json[area] = {};
}
json[area][key] = lang;
}
grunt.file.write(path, JSON.stringify(json));
}


Trying to check the path of the file for a specific value, it will be listed in the file name as a numeral language code. For example:

path = "./language-files/json/masterLang.EN.json"


I want to target the "EN" portion of the path. Typically I would use an indexOf() and find it that way, the issue is that I'll be having several different language types and I don't want to make an "if else" nightmare out of this.

How would I build this so I can store all the values in an object so every time a loop completes and a new language file is selected, it'll assign the correct language code? This is what I'm thinking below but my syntax is all sorts of messed up.

langType = [{
EN:"en-US",
IT:"it-IT",
BR:"pt-BR",
FR:"fr-FR"
}];


Am I on the right track? Anyone have some advice?
>>
Lets say I have a local copy of a project

When I do 'git push master', I want it to deploy to my online server. What steps would be involved in something like that?
>>
>>51516013

git push origin master
>>
>>51516013
http://readwrite.com/2013/10/02/github-for-beginners-part-2
>>
>>51515957
Thats what Obama said on the news. "Dash causing terrorism in middle east."
>>
>>51516060
>>51516030
No, I have a repository on bitbucket. When I do git push, I want it to also push the new version of my project to my live server that is hosting the site if all the tests pass
>>
>>51516333

>if all the tests pass

Sounds like you have parameters that are outside of git's typical usage. Are you uploading it through a FTP/SFTP?
>>
>>51516013
Maybe something like webhooks. Get an update when a branch commits, pull update, run test on deploy server, deploy to production if pass.
>>
>>51515970
That's helpful, but I need a way to test ios mobile browsers. Is there an ios emulator or something for android?
>>
>>51516436
Ahh, developer options in safari
>>
>>51516375
>webhooks
Thanks, I'll look into it.
>>
>>51516482
So you basically need an iPhone and Macbook to develop?
>>
Whats the best way to learn the MEAN stack?
>>
>>51516752
take little kids' lunch money
>>
I know basic PHP and developed a few sites with it. I'm currently learning Laravel. Is that a good idea or am I getting ahead of myself here? It's actually pretty cool, makes me appreciate it because of the bullshit I went through with just PHP.
>>
>>51516752
By not learning it. Mongodb is not fit for production.
>>
>>51514875
About to work on a application for steam I've been thinking of for awhile now. However, all of the Steam api works through JSON objects. Should I learn node.js before or work in PHP?
>>
>>51517141
Can't PHP parse JSON?
>>
>>51517171
yes
json_decode()
>>
>>51517189
So what is the problem? Native JSON is a notable boon, though.
>>
>>51517227
How the hell did I not think about that
>>
>>51517189
>>51517227
Thanks, so you think it'll be fine being written in PHP?
>>
C:\Users\me>npm install -g mongodb
C:\Users\me\AppData\Roaming\npm
└─┬ [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY kerberos@~0.0
├─┬ [email protected]
│ └── [email protected]
└─┬ [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

npm WARN EPEERINVALID [email protected] requires a peer of kerberos@~0.0 but none was installed.


what the f*ck does this mean
>>
>>51517601
it means u installed it WONG
>>
>>51517655
f*ck.............F*CK
>>
>>51517601
>
[email protected] requires a peer of kerberos@~0.0 
>>
>>51517450
I'd pick Node, C# or maybe Elixir, as long as it's not PHP.
>>
>>51517601
>mongodb
>>
>>51517674
Thanks, I'll probably go with node now. I take it it's more than worth it to learn the new language?
>>
>>51517601
>kerberos@~0.0
sup man, just connect to me
>>
>>51517689
Are you a web dev that does not already know Javascript?
>>
>>51517724
No don't worry, just the whole ecosystem of node.js would take some time to get used to I'm assuming.
>>
dpt is too nerdish
>>
>>51517737
Can be learned in a day or two. Npm is another beast, though.
>>
>>51514875
So what should I learn? Ruby? Node? Python? Golang? C#?
>>
>>51518143
Python seems friendly
>>
>>51518143
Node or Go.
>>
any pastebins to JavaScript based games?
>>
I got one
>>
>>51517674
Shut up neet
>>51518143
You should learn whatever you want to learn, after asking several people and investigating.
>>
>>51519465
Shut up, codemonkey.
>>
>>51519655
This is not /biz/. What are you doing here? Go away.
>>
What do you think of this game
>>
>>51519787
>What do you think of this game

http://thegames.neocities.org
>>
and that one
http://game2.neocities.org/
>>
>>51519799
No score, no goal, no defeat.
>>51519867
Should be full screen, as you can unknowingly move the pointer out of the canvas.
>>
>>51518119
Oh rly? Why didn't I apply to that job which required me to know Node then? I could have picked it up in a couple of days...
>>
>>51520526
Pretty much. Node is just JS + some extra modules + npm.
>>
>>51517601
ur using winblows brp
>>
> Where Node really shines is in building fast, scalable network applications, as it’s capable of handling a huge number of simultaneous connections with high throughput, which equates to high scalability.

How the fuck doesn't this conflict with this:

You definitely don’t want to use Node.js for CPU-intensive operations; in fact, using it for heavy computation will annul nearly all of its advantages.

How do you actually maintain all those simultaneous connections with a server if not by running CPU operations?
>>
>>51520766
CPU intensive work probably means number crunching on the line of brute forcing hashes. That will just stall the thread. For example, you would not want to convert images directly in JS.
>>
>tfw you were making great progress with react but haven't done anything since /g/ started criticizing you a few days ago for using react instead of rolling your own shit
i just wanted to focus on making the application, dammit.
why are you trying to force autism down my throat?
>>
Which one of you fucks use Laravel?
Regardless what's the difference between
redirect->route($routename)

And
\Redirect::route($routename)


That said, camel case a shit.
>>
>>51514875
I've got a couple website ideas, but using node, everyone and their mom still uses PHP for serverside shit, whats a good site host that supports node?
>>
>>51521222
Any VPS provider.
>>
>>51515097
line-height: -2px
>>
How can I instill a queue system in node? Something in memory is fine. Basically a request comes in with a variable, node will push it to an array. On push, it checks if a process has finished and if it has, calls a function. If not, it waits for it to finish.
>>
>>51518143
It wont take you more than a week to learn Python, trust me.
>>
Can you recommend me some document-oriented DB which is lightweight and easy to use? With bindings to Python preferably.
>>
>>51521604
RethinkDB.
>>51521552
Have you tried pushing your request objects to an array and having a consumer shift them? Though you really don't need to go that far, unless it is some very intensive work.
>>
>>51521123
I bet the second one uses __call() on a new Redirect object. Well, I'm not sure, check the source code, and keep using dependence injection if needed.
>>
>>51521552
>>51521624
I figured this out, in case anyone is interested.

// Global queue object to track function call
queue = { status : false };

// Set job queue array
var myEventsQ = [];

// Socket io connection
io.on('connection', function (socket) {
socket.on('imei', function (imei) {
var result = JSON.parse(imei);
console.log(result.imei);
// Push variable to job queue array
myEventsQ.push(result.imei);
});

socket.on('disconnect', function(){
console.log('user disconnected');
});
});

// WatchJS library
// watch global object queue.status for true / false
watch(queue, 'status', function () {
if (queue.status == false) {
if (myEventsQ.length > 0) {
var imei = myEventsQ.shift();
gsat.gsatImeiEligibility(imei);
} else {
console.log('No IMEI requests in queue');
}
} else {
console.log('IMEI request in progress');
}
});

// Called on myEventsQ array push
// Call worker function only if one entry in jobs and global queue.status is false
function processQ() {
if (myEventsQ.length == 1 && queue.status == false) {
var imei = myEventsQ.shift();
gsat.gsatImeiEligibility(imei);
}
}
myEventsQ.push = function() {
Array.prototype.push.apply(this, arguments);
processQ();
};


I'm sure if there is a better way of doing this. Each job only takes about 5 seconds to complete.
>>
File: Capture.png (76 KB, 1910x836) Image search: [Google]
Capture.png
76 KB, 1910x836
Did anyone notice how shitty the eBay site is?

I imagine it must be a huge pile of old shit with some Java backend.
>>
>>51522355
It's complete shit. Always system issues.
Someone needs to come along and wipe them out.
>>
>>51522355
>le java is bad may may

when will it end?
>>
>>51522855
when it gets good i.e. never
>>
>>51522355

They have no reason to have their site look that shitty, same goes for Craigslist. They can do better, even if it means using a basic bootstrap template and some additional styling.
>>
>>51522210
What is this job?
>>
>>51523626
It just validates if a mobile phone can activated on a carrier's network.

>IMEI comes in via socket transport
>async request opens session to carrier's backend
>responses with result
>>
>>51523873
And the backend can only take one request at a time?
>>
>>51523919
There is no API available for this external backend. Just a login to their portal. So it the bot I wrote logins in on node start and keeps the session alive. When a request comes in, it posts to an input and parses the response.

I could have multiple sessions to this external portal; it doesn't seem to mind multiple logins. However, the login process would add another 6-8 seconds onto the request from our client.

Unless I make several workers, like 3 to 5 and divide the job pool between them....
>>
>>51516135
fucking kek
>>
>>51523212
there is no reason for craigslist to change anything.
>>
You can't spell Wordprass without ass.
>>
>>51514875
why death to php?
and why should ruby on rails be better?
>>
>>51524746
OP here, no idea, I copied and pasted the last Thread's OP
>>
>>51524746

There's nothing wrong with PHP imo, and it'll be around for a long while.
>>
>>51525028
>it'll be around for a long while
thanks wordprass!
>>
>>51525111
Wordpress is moving to Node. They are sick of PHP, too.

There is nothing right with this language. It's great that it's dying.

http://ma.tt/2015/11/dance-to-calypso/
>>
>>51525111

And Yahoo, Facebook, Wikipedia, and so on.
>>
>>51525244
>just started learning PHP
>people are already moving from it
FUCK
>>
>>51525244
>moving to node from php
it only gets worse.
>>
it won't die
>>
>>51525307
nope, this is the future
soon, node will be bigger than php
>>
>>51525320
absolutely disgusting

its a hack of a language as it is
>>
>>51525320
>>51525336
https://node-os.com/
>>
>>51525298

Imagine my horror being most proficient in PHP. Now I have to learn Node to stay relevant.
>>
>>51525298
Are you insane? How does that make you UNHAPPY?

It will be great when we leave PHP behind. The language discourages good design, encourages huge security problems, has one terrible clusterfuck of a standard library that only contains like 3 functions that are useful, manages to be verbose while not providing security or syntactic sugar and the developers manage to break existing code with every new release, even though they didn't fix any of the HUGE amount of issues of the legacy codebase.

Node is better. Fucking Javascript is better. I can't believe I'm saying this either. Trust me, I don't want to say this. I prefer C# and Scala, too. But if the future is Node.js with ES6 and ES7, then I'll take that over PHP any day.
The main problem that Javascript has normally are browser specific API differences and lack of support for new versions of the language.
You don't have those on the serverside.
>>
>>51525244
They should focus on improving Wordpress instead. Even after so many years it misses so many basic features.

>gallery
>sorting posts
>most seo features
>mobile friendly menus
>changing layout depending on the post/category
All kinds of basic shit you now have to code yourself or download a plugin for.
>>
>>51525378
Not to mention firewall features.
>>
>>51514875
>Death to PHP

Why?
>>
>>51525377
That makes me unhappy because I MADE THE WRONG CHOICE
>>
>>51525408
Yeah. But if you did it right, you didn't just learn PHP by heart, but you learned how to properly program.
In that case, you'll be able to pick up similar (better) languages and use those instead.

Unless of course you actually relied on Rasmus' bullshit features like superglobals, html_real_escape_string, jdtojewish or easter_date to handle your web requests.
Then you'll need to change a lot.
>>
So, I want to learn Ruby on Rails. I've already finished Ruby lessons on codeacademy and started to learn RoR lessons, but they're shit, basically just "Copy and paste this and that's why we did it. Understand? No? Well fuck you, pay for codacademy pro or fuck off."
Where should I go, what should I read? That the odin project thing?
Thanks.
>>
>>51525458
>easter_date
Hahah, what? And I moved onto laravel the moment I got acquainted with PHP. Now I don't want to go back to pure PHP
>>
>>51525461
Do projects with it and use google when you're having issues.
>>
>>51525244
Calypso is a desktop interface to a remote Wordpress multisite hosted by wordpress.com

Javascript would not be the best language for millions of developers who would want to port quicly their themes to a soup of callback hell and HTML/js code, not using modules/promises, etc, because fuck all.
People bash PHP for Wordpress? Wait until 20% of the most popular plugins/themes are ported to node.js
>>
>>51516333
I configured jenkins to poll a git repo every X minutes. After it pulls a update, it automatically builds, tests and deploys to a webserver.
>>
>>51525485
That's fine, but you should have read the official language reference at least once.
>>
>>51525461
Why not read a recommended book? I was getting tired of starting on a new language/framework just to find "Hello world" tutorials on the net, so now I'm reading books instead.
>>
>>51525485

I learned the other way around. Just getting into Laravel.
>>
>>51525377
>The language discourages good design
And JS or python encourage good design? lamo.
>>
>>51525550
>lamo
lmao.
>>
>>51525575
lamo is funnier
>>
>>51525244
Most of the backend will still be PHP. They are only moving some stuff to Node and doing a bunch of new stuff with it.

PHP will still be like 90% of the platform.
>>
>>51522355
A site looking shitty has nothing to do with the backend.
>>
>>51525585
You're probably one of those fucks that types t-b-h and f-a-m
>>
>>51525617
You is angrier
>>51525624
Just don't use those functions twice in every method.
>>
>>51525320
>>51525342
This is absolutely horrifying. Anyone who thinks its ok to use node.js in production for anything other than pet projects or demos shouldn't be allowed to make decisions. Use the right tool for the job people.
>>
>>51525611

Cheers, Geoff.
>>
>>51525662
If by not pet projects you mean things like Google, YouTube or Netflix, then yeah, there might be better alternatives available. Although all of those platforms probably have some components utilising Node.

For the majority of use-cases it is a strong contender. It's more performant than anything written in Ruby or Python and scaling is a breeze if you actually program your backend to be stateless (and you should).

There are thousands of plugins in npm and you can quickly find very useful stuff with permissive licenses.

I wouldn't call Node.js the future but it's clearly showing the way right now.
>>
>>51525820
>stateless
If only you could do that with websockets, otherwise a must.
>>
>>51525624
>>http://php.net/manual/de/function.gzgetss.php (My favorite. Rasmus outdid himself on that one).
Wait, what.
Why would you try to read compressed archives in a browser?
>>
>>51526201
Even if you ever wanted it, you might as well just use strip_tags(gzgets));.

It's one of Rasmus' masterpieces. My other favorites are mysql_escape_string and mysql_real_escape_string.
You can't make this stuff up. Unless you're drunk, destroyed your mind with drugs or are Rasmus Lerdorf.
>>
File: 1438274388568.jpg (28 KB, 500x422) Image search: [Google]
1438274388568.jpg
28 KB, 500x422
>>51526260
What the hell.
Levensthein is pretty cool, though, but I don't really see why would it be in standard library.
>>
>>51526293
Well, Razzledazzle admits it. Just read some of those:

https://en.wikiquote.org/wiki/Rasmus_Lerdorf

>I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests.

>I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way.

>Ugly problems often require ugly solutions. Solving an ugly problem in a pure manner is bloody hard.

>...Back when PHP had less than 100 functions and the function hashing mechanism was strlen()...
(This is the reason the standard librarie's function names are so horribly inconsistent. He deliberately designed it that way so the hashing function, strlen, would evenly distribute functions)

Can't. Make. This. Shit. Up.
>>
>>51526380
He already has too many haters, I guess he would love a tsundere fan more.
Send him a letter ;))
>>
>>51526380
>>I don't know how to stop it, there was never any intent to write a programming language [...] I have absolutely no idea how to write a programming language, I just kept adding the next logical step on the way.
>>I'm not a real programmer. I throw together things until it works then I move on. The real programmers will say "Yeah it works but you're leaking memory everywhere. Perhaps we should fix that." I’ll just restart Apache every 10 requests.
I'm beginning to wonder how does he still breathe.
>>
>>51526447
He's not a complete moron. He just wasn't fit for making the language that powers most of the web.

The people who developed the later version of PHP should have instead realized that were were terribly bad, but also revolutionary, good things about PHP that you can learn from.

A new language should have been created.

Sure, it a language created in the mid 90s, even if it was well designed by standards of that time, wouldn't be as enjoyable to use as Python or C# or other modern languages today. But it would still be much better than the terrible mess language we have to use today because "every (irrelevant) company is using it and muh hosting is cheap because of it!".

>>51526431
It's not like I like him or anything, you idiot! What are you saying?! M-Me and Rasmus? How absurd! How disgusting!
>>
I'm writing image-upload handling code in Clojure for a server I'm writing. Any feedback on this code would be very appreciated.
(defn handle-upload [{:keys [filename] :as file}]
(let [filename-escaped (clojure.string/replace filename #" " "_")]
(println file)
(upload-page
(if (empty? filename)
{:errors "Please select a file to upload."}
(if (.endsWith (clojure.string/lower-case filename) "gif")
{:errors "GIF uploads are not supported."}
(try
(println (str (gallery-path) File/separator filename-escaped))
(upload-file (gallery-path) (assoc file :filename filename-escaped))
(save-thumbnail (assoc file :filename filename-escaped))
(db/add-image ((session/get :user) :user_id) (gallery-path) filename-escaped)
{:image (thumb-uri ((session/get :user) :uname) filename-escaped)}
(catch Exception ex
;(error ex "an error has occured while uploading" name)
{:errors (str "error uploading file " (.getMessage ex))})))))))
>>
>>51515268
margin-top: 0px;
>>
Microsoft says IE 10 is kill
https://www.microsoft.com/en-us/WindowsForBusiness/End-of-IE-support
>>
>>51526712
Good riddance.

If only the consumer understood this, though.

IE8's market share still being so high is pathetic.
>>
>>51526846
Now if only Edge wasn't a steaming pile of shit.
>>
>>51526846
I assume it's because that you have to actually run windows updates to get IE10
>>
>>51526990
Well, at least it's improving rather rapidly.

>>51526995
Nah... There are still many plebs who ignore the "Dude, Windows XP is no longer supported. Seriously. It's been 14 years. You need to upgrade to something else, for your own safety" -Messages. And companies... oh god, the lengths they go to in order to avoid upgrading their IT infrastructure...
>>
>>51527044
You can't just go out of your way to upgrade machines as the software was written to run that particular OS, otherwise you're going to spend just as much time trying to get what those codemonkeys from local community college put together in their free time. Also because factories run 24/7, so you can't just shut it down for a week to make IT infrastructure upgrades.
>>
>>51525611
Their site works like crap too. So the backend must be shit too.
>>
I want to make multiple calls to an API using AJAX and store the result of the calls in an array (unordered).

I'm assuming that there's a thread-safety issue involved with the multiple calls all pushing to the same array? How do I get around the problem?
>>
Fucking christ, i spent almost 2 hours trying to do a simple Update sql query. Turns out shit didnt work because the column was named "group" and for some reason that name is reserved by mysql and fucks shit up. No warning or anything, just 2 hours of troubleshooting till i found out.

Who invented this shit?
>>
>>51527502
If a name is reserved, SQL tends to tell you that the moment you create that column.
You're just retarded.
>>
File: moustache Guy.webm (3 MB, 720x480) Image search: [Google]
moustache Guy.webm
3 MB, 720x480
I read all of these anti-php stuff here but then i watch videos like this:
https://www.youtube.com/watch?v=MWTe-iswnqc

So what am i to believe? Some parts of the internet people speak of "PHP revolution that is taking over the world and its wonderful and the future is amazing" whilst on other parts of the internet all i can hear is "PHP IS DYING, FUCKING SUCKS DICK NODE SO MUCH BETTER LOLOL"

Such different polar opposite opinions, who the fuck is right??
>>
>>51527502

You can name a column group if you wish, I just tried it. But you need to add the apostrophe thing to it.
For example;

 UPDATE my_table SET `group` = "Some value" WHERE `the_id` = '1'; 
>>
>>51527537
Guess im heidiSQL fucking sucks then.

>>51527723
Thanks good to know
>>
>>51527471
>JS
>threads
>>
http://www.freecodecamp.com/map

why does this site teach jquery before JS? shouldnt it be JS first then jquery?
>>
>>51528045
it should
>>
>>51527713
PHP isn't dying fast enough, but it should. It's a broken non-programing language with absolute shit performance in comparison to Node, Go or C#.
>>
>>51527966
If two AJAX calls concurrently push to the same array how do you ensure they don't clash?
>>
>>51528171
By doing absolutely nothing. They will never clash. It's the same thread.
>>
>>51528223
Cool. That makes things much simpler for what I'm doing.
>>
>>51528143
In web development, processing speed does not matter much when you have to wait 50 ms until that SQL query ends, and the client is in the other side of the planet. Stop repeating 'muh speed' unless you are doing heavy calculation tasks.
There are several issues with PHP and other dynamic languages, but performance is not one of them. Blame libraries instead.
>>
I had a simple idea but it requires me to scrape data from a wiki/wiki's table. Is there an api for it or could I build one in js/python/php?

Basically I want to grab data once or every few days so that I can it better. Sorting it simple for me, I'm just not sure how I should go about scraping. I've barely touched Python but I know the others well enough.
>>
>>51528496
*so that I can sort it better
>>
>>51528469
You don't seem to understand the implications of shit performance. It means your requests will take longer to process and consume more RAM and CPU cycles each. RAM and CPU are finite. It means that you will reach the cap much more easily, and because the requests also take longer, the congestion will be even greater.
>>
>2015
>i have to choose between using things made 5+ years ago or ruining my load times
thanks obama
>>
>>51527713
php being bad is a meme of half-truths. it is simply so old that it didn't foresee features we'd be using today, so in the past few years a number of languages sprung up and have figured out ways to deliver content more dynamically using less resources.

But since everything is always in flux there's no reason to write it off. PHP will always evolve, as every other language will always evolve.

also that video is obviously biased because it's from PHP World, the whole purpose of which is to promote use of PHP.
>>
>>51528766
Processor speed matters, but there are several things to be tuned like throughput, threading or concurrence, memory usage, database access, cache, network speed, etc.
The patches and technology depend on your project.
>>
>>51528882
Yes, and you can't tune a project in a better, faster language. Only PHP.
>>
>>51528882
I said technology depends on your project.
That's when developer's expertice, development speed, available libraries, and experience with similar past projects become issues too.
>>
Is there a non-terrible way to do cross-browser grid-based layouts yet?
>>
>>51529596
http://susy.oddbird.net/
>>
>>51527379
This argument can go the other way too. Pomf's frontend is okay-ish and will be soon better with new JavaScript, but the backend kind of sucks.
>>
crappy fired web developers represent
can anyone give me a j-job?
>>
>>51529665
ouch. story?
>>
>>51529715
said i was too slow. been looking around for some testing jobs. maybe dev isn't for me
>>
File: 1405793796887.jpg (9 KB, 208x250) Image search: [Google]
1405793796887.jpg
9 KB, 208x250
>>51526587
>might fuck those brackets everywhere
>>
>>51528223
A new problem I have. I call the API let's say 10 times. In the success function I console.log the returned data.

In the network tab of the chrome developer window I see 10 GET requests that return successful callbacks with correct information in the return and a code of 200.

But the console.log only triggers ~6 times and I only get 60% of the results.

If it's not a thread issue what the fuck is going on?
>>
>>51529730
What made them say that?
>>
>>51529760
Post code.
>>
>>51529774
Guessing he was a bit slow.
>>
>>51530110
How can you be slow in this field?
>>
>>51529758
(                   [{      [        ]         }]
( [ ( )]
( )
(
( ( )
{ }
( ( ( ) )
{ }
(
( ( ( ) ))
( ( ) ( ))
( ( ))
( (( ) ) ( ) )
{ ( (( ) ) )}
(
( )
{ ( ( ))})))))))
>>
>>51530217

Not sure if this is a serious question. If he was required to complete projects using a number of languages and libraries I can see where he'd run into difficulties. Then again, if you hit a snag there's always the internet to bail you out.
I've never worked in an office setting doing web dev so I don't know how strict they would be on him googling shit to help you finish a project.
>>
File: wG51k7v.png (66 KB, 597x255) Image search: [Google]
wG51k7v.png
66 KB, 597x255
>>51532512
jQuery. Just remember that you don't need whitespace :^)
>>
File: design_finished.png (27 KB, 1591x785) Image search: [Google]
design_finished.png
27 KB, 1591x785
my new homepage is done.

hope u like it
>>
>>51533178
>once a week.
>>
>>51533216
gotta keep my goals manageable.
>>
>>51514875
Should I learn Node now that it's being managed by WOW SOO PROGRESSIVE people?

Is it possible/likely that they'll fuck it up somehow?
>>
>>51533178
hi anon can you give me the source code for this design
>>
>using anything other than LAMP stack
what on earth. node and ruby are memes
>>
>>51533299
here ya go, friendo.

https://github.com/CodeZombie/Newtab-homepage/tree/master
>>
>>51533396
where does it store the "list to remember". I'm new Is it the cookies?
>>
hey guys i made this today, how much longer until i get a job and make ONE BILLION DOLLARS ?
>>
Never use 000webhost.

Ever.

I had a webpage that was getting about 5k views a day.

They just deleted my website for "inactivity"

I logged into the website once a day to read emails.

Now they just deleted another domain that I was using for fun dev projects.

All my other domains hosted there that are literally inactive? Just fine.


Also they keep saying the ads displaying on everyones website is a virus on our end, but when you go to a website hosted at 000webhost it randomly redirects to call4joke websites and shit like that.

Avoid them like the plague. They also don't pay their affiliates. I've sent them over a dozen referrals and got not a god damn thing but my website deleted.
>>
>>51533708
I made 3 of those last weekend
>>
>>51533713
just registered ->Free
server
>>
>>51533713
pay 15 bucks for a fucking vps jesus christ
>>
>>51515097
img {vertical-align: baseline;}
>>
>>51533905
Any recommendations?

That website only made like 15 dollars ever few months so it wasn't worth it.

That's what happens when your market is shitposters who all own adkek
>>
do you use google ads
>>
>>51533713
000webhost recently got hacked and it was revealed that they stored all of their passwords in plaintext, its owners are lower than shit-tier web developers
>>
holy shit angular js is fucking sweeeeeet
>>
OK maybe i'm just fucking retarded, but i've literally been googling for like 1 hour 40 minutes trying to find out:

- if I could somehow capture console.log output and throw it somewhere other than the console

- if I could take a json blob and use some similar method to console.table() to render an HTML table

I mean seriously guys, look at this fucken table. It's fucking beautiful
>>
>>51534498
Now look at this ugly shit.

How do I get this object, to a table that looks EXACTLY like the console.table() table, preferably in html format

How do I do this, without importing some big-ass library, or doing a bunch of work?
>>
>>51534054
>plaintext
That actually explains a lot.

>storying passwords in anything other than blowfish

What the fuck, man? Fuck those guys. Their support says "It says here your website was inactive"

They seriously only deleted the ones that had traffic because I was free hosting.
>>
>>51534498
>>51534516
I'm kind of starting to get it. But is there an easier way? This is tedious.

I did find a quick way to get javascript objects onto files in my local file-system.

netcat on listen mode
and have the JS just POST a whole bunch of data to netcat
>>
>>51533967
i like Ramnode's 15 dollar a year SSD-Cached Massive package. Low specs though. If you're a real professional you use digitalocean, but thats more money
>>
<?php?> is nice
>>
tell me something cool to make in wd
>>
>>51534324
I'll wait for Angular 2 for some reason, but don't mind me.
>>
>>51535341
Realtime 4chan word cloud.
>>
>>51526564
python and ruby are from the 90s m8. they are both pre 95 iirc
>>
What "should" I be using instead of PHP? I've learned HTML and CSS in the past, been dabbling with JavaScript the last few days because I've decided fuck it, no more systems / general applications programming, it's time to learn web shit because finding a job will be easier if I do.
>>
>>51536365
some Ruby shit is made by femi faggots
>>
>>51531097
My office tends to support people who google out solutions instead of forcing the whole deal.
Not that guy.
>>
https://www.scaleway.com/pricing/
I've yet to find cheaper.
>>
>>51536657
They have their registration closed right now because the hit the critical mass... Thankfully, I made an account a month before that. I haven't uploaded anything to the server yet tho so I don't know how it performs
>>
>>51536568
Okay then
>>
Just want to thank you the dude who suggested pjax. It's great.
>>
>>51517674
>PHP is a shit language!
>use Javascript instead
hahahahahahahahahahahahahahhhahahahahahahahahahahahahahh hahahahahahahahahahahahahahhhahahahahahahahahahahahahahh hahahahahahahahahahahahahahhhahahahahahahahahahahahahahh hahahahahahahahahahahahahahhhahahahahahahahahahahahahahh hahahahahahahahahahahahahahh
>>
>>51527379
The language choice of the backend has nothing to do with the quality of the implementation of said backend.
>>
People online always write that extending the useless nodelist prototype in JS with some features, like forEach, map or filter, is "bad" for some reason.

Why?
I get why it's bad to extend things with very complex behavior or that are part of complex prototype chains, but nodelist is one of the most boring, basic elements there is.

And if you're scared about the extension being visible, you can just use defineProperty with enumerable: false, isn't that right?

So why? I want to ditch jquery, but the DOM nodelist is a very, very, very poor replacement.
>>
Reminder to publish on IPFS!
Reminder that ipfs and smart contracts are the future!
Reminder to develop against a smart contract framework and to distribute a thin replication server to get rid of central authorities!
>>
>>51536808
Javascript's main weaknesses are the cross browser inconsistencies, the fact that it sucks at manipulating the dom unless you add tons of bloat and the fact that legacy browsers simply don't support new syntax and APIs.

You don't have those problems on Node. You can always use the latest version of the language, don't have to interact with any browser APIs and it behaves consistently.

You don't even have to write Javascript. You can write Typescript if you like the type safety. Or Dart. Or Coffeescript. Even C++ programs compile to JS nowadays.
>>
>>51536999
It's still shit and if it weren't for bureaucrats, we would have a lisp dialect instead and everyone would be happy.
>>
>>51537066
Yeah, I hate javascript as well, please don't get me wrong.

But when I compare modern Javascript, to "modern" PHP, I know where my preference lies.
>>
>>51537096
Modern PHP is not nclude/require and html soups anymore. What else do you hate about it, besides the api?
>>
>>51537137
I know that. We use PHP at work. Composer, Symfony 2, all that shit.

I feel like I'm using Java's very retarded brother.
What's wrong with it? What's right with it?
>>
>>51537159
I'll try Symfony 3 once it is available. But I guess I'll like to develop in Laravel or Phoenix (Elixir) more.
>>
>>51537218
I'd totally use Laravel if I could.

Only one problem: The company is retarded.

Symfony isn't really worth checking out if you ask me. It's trying way too hard to be Java. Verbose as fuck. Trying to implement features that simply don't exist in PHP (annotations). Not using PHP's strengths (yeah, it actually has some) because "Muh PHP 5.3 support and muh 100% OOP only, even in situations where it's less clear and you write 20x more code!".
It's way too verbose. The service container for dependency injection, while very powerful, requires too many changes for simple stuff.
Unlike ASP.net, where you can just inject stuff into your service or controller by type hinting the parameter with the registered interface of the service or Laravel, which provides these neat Facades for minimal boilerplate, you just get the worst of all worlds.
Much functionality that you're expecting from modern frameworks, especially ones with such a huge size, are missing as well. Yeah, you can use third party bundles, but those generally have poor quality and different standards than all other bundles. They don't play well together.

The Form component is really neat, though.
>>
>>51533701
not cookies.
It uses localstorage: http://www.w3schools.com/html/html5_webstorage.asp

I made a index:value database abstraction layer (database.js) which stores the "things to remember" as json items in the localstorage db.

arguably, for what I'm doing here, it could be a lot simpler, but I like the idea of having a proper db library, and I really wanted to write one.
Thread replies: 230
Thread images: 17

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

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.