Topic Wiki

Training
Codecademy.com offers hand on courses for  various coding languages including HTML, JavaScript, CSS, and more. FREE
TreeHouse.com 8)
w3schools.com
regex

Resources
Browser compatibility
Can i use

To test/show-of your skills
html - css - js
http://codepen.io/pen/
http://jsfiddle.net/

My sql
www.sqlfiddle.com

Editor
notepad-plus-plus.org/

android development
http://developer.android.com/sdk/index.html

js librery
http://greensock.com/ nice animation
getbootstrap.com/css/ responsive layout
jquery.com do more write less

Free Books
http://it-ebooks.info/

Test client browser version
http://browser-update.org/
« Last edited by yesitsme on May 17, 2015, 11:13:37 AM »

Author Topic: Programming for Beginners  (Read 62614 times)

Offline Cholentfresser

  • Dansdeals Lifetime Platinum Elite
  • *******
  • Join Date: Mar 2009
  • Posts: 1845
  • Total likes: 20
  • DansDeals.com Hat Tips 1
    • View Profile
Re: Programming for Beginners
« Reply #375 on: September 14, 2016, 11:48:53 PM »
You are correct if the 2 modules that instantiate it are in the same folder. If not, they could return different instances.

https://stackoverflow.com/questions/10306185/nodejs-best-way-to-pass-common-variables-into-separate-modules#comment49587993_10316422
I hear ya. FWIW, I think the DI option seems pretty clean.
In order to understand recursion, you first need to understand recursion.

Offline AnonymousUser

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Feb 2013
  • Posts: 3014
  • Total likes: 4
  • DansDeals.com Hat Tips 0
    • View Profile
Re: Programming for Beginners
« Reply #376 on: September 15, 2016, 03:20:06 PM »
Is there any reason to render views client-side with frameworks like Angular or Backbone, as opposed to doing everything on the server?

Offline yesitsme

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Dec 2014
  • Posts: 2660
  • Total likes: 588
  • DansDeals.com Hat Tips 4
  • Gender: Male
    • View Profile
Re: Programming for Beginners
« Reply #377 on: September 20, 2016, 12:44:09 AM »
Where's php 6, windows 9, IPV5?
they all went into hiding..

Offline AnonymousUser

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Feb 2013
  • Posts: 3014
  • Total likes: 4
  • DansDeals.com Hat Tips 0
    • View Profile
Re: Programming for Beginners
« Reply #378 on: September 20, 2016, 11:08:27 PM »
I'm having issues setting up Express routers.

Code: [Select]
//this works
router.route('/deals/:id')
    .get(function (req, res) {
            res.send("/deals/" + req.params.id);
        });
    });

//this doesn't work
router.route('/deals/')
    .get(':id', function (req, res) {
            res.send("/deals/" + req.params.id);
        });
    });

With the second way, Express throws an error
Code: [Select]
Error: Route.get() requires callback functions but got a [object String]The docs (http://expressjs.com/en/4x/api.html#router.METHOD) say that the parameters for router.METHOD() are (path, [callback, ...] callback). However, from this error it looks like path doesn't belong there.
Unless router.route().METHOD() is different than router.METHOD()?
Am I missing something?

Offline AnonymousUser

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Feb 2013
  • Posts: 3014
  • Total likes: 4
  • DansDeals.com Hat Tips 0
    • View Profile
Re: Programming for Beginners
« Reply #379 on: September 21, 2016, 01:05:56 AM »
I'm having issues setting up Express routers.

Code: [Select]
//this works
router.route('/deals/:id')
    .get(function (req, res) {
            res.send("/deals/" + req.params.id);
        });
    });

//this doesn't work
router.route('/deals/')
    .get(':id', function (req, res) {
            res.send("/deals/" + req.params.id);
        });
    });

With the second way, Express throws an error
Code: [Select]
Error: Route.get() requires callback functions but got a [object String]The docs (http://expressjs.com/en/4x/api.html#router.METHOD) say that the parameters for router.METHOD() are (path, [callback, ...] callback). However, from this error it looks like path doesn't belong there.
Unless router.route().METHOD() is different than router.METHOD()?
Am I missing something?
Apparently it looks like router.route().METHOD() is indeed different than router.METHOD(), and it does not take a path as a parameter, just callbacks.
https://github.com/expressjs/express/blob/master/lib/router/route.js#L186

Online Yonah

  • Dansdeals Platinum Elite
  • ****
  • Join Date: Mar 2014
  • Posts: 480
  • Total likes: 224
  • DansDeals.com Hat Tips 4
    • View Profile
Re: Programming for Beginners
« Reply #380 on: September 26, 2016, 11:28:05 AM »
Is there any reason to render views client-side with frameworks like Angular or Backbone, as opposed to doing everything on the server?

Speed, Performance and #requests on the server.

For example, let's say you were loading a set of data from the server and wanted your end users to be able to sort and search it. If you rendered it server side, every sort request or search request would require a round-trip to the server. If you render the client in Angular/Backbone, you can sort/search using the local data, which is a lot quicker, and sends fewer requests back to you.

Offline AnonymousUser

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Feb 2013
  • Posts: 3014
  • Total likes: 4
  • DansDeals.com Hat Tips 0
    • View Profile
Re: Programming for Beginners
« Reply #381 on: September 27, 2016, 12:16:43 AM »
Speed, Performance and #requests on the server.

For example, let's say you were loading a set of data from the server and wanted your end users to be able to sort and search it. If you rendered it server side, every sort request or search request would require a round-trip to the server. If you render the client in Angular/Backbone, you can sort/search using the local data, which is a lot quicker, and sends fewer requests back to you.
Good point.
I assume that data that will not be manipulated client-side is faster to render on the server.

Offline Achas Veachas

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Jul 2012
  • Posts: 4224
  • Total likes: 35
  • DansDeals.com Hat Tips 3
    • View Profile
    • Torah && Tech
Re: Programming for Beginners
« Reply #382 on: October 30, 2016, 02:02:17 PM »
Did you do their online course or on campus? I know python basics (I too used DDMS for a project. A few years ago I built a python script to text me when DDMS had certain keywords like 'mistake' etc) but want to learn RoR to better understand my company's website. Would you recommend Flatiron?
I know this is from a while ago (I've been kinda missing lately :) )
I'm doing the online course (Learn-verified). Pretty happy with it. Let me know if it's still pertinent for you and if you want more info.

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11412
  • Total likes: 1437
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Re: Programming for Beginners
« Reply #383 on: November 06, 2016, 10:37:04 PM »
Does anyone know if it's possible to send data to a webhook via a bookmarklet?

TY
Workflowy. You won't know what you're missing until you try it.

Offline bubbles

  • Dansdeals Lifetime Presidential Platinum Elite
  • *********
  • Join Date: Jul 2011
  • Posts: 5055
  • Total likes: 17
  • DansDeals.com Hat Tips 67
    • View Profile
Re: Programming for Beginners
« Reply #384 on: November 07, 2016, 01:07:10 AM »
Create and post a form?

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11412
  • Total likes: 1437
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Re: Programming for Beginners
« Reply #385 on: November 07, 2016, 10:47:17 AM »
Workflowy. You won't know what you're missing until you try it.

Offline AnonymousUser

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Feb 2013
  • Posts: 3014
  • Total likes: 4
  • DansDeals.com Hat Tips 0
    • View Profile
Re: Programming for Beginners
« Reply #386 on: November 07, 2016, 01:43:25 PM »
Huh?
Find the URL and data structure that the webhook takes, then write a script in the bookmarklet that submits that request.

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11412
  • Total likes: 1437
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Re: Programming for Beginners
« Reply #387 on: November 07, 2016, 01:46:34 PM »
Find the URL and data structure that the webhook takes, then write a script in the bookmarklet that submits that request.
How do I write a script to submit the request? I've never dealt with webhooks before and not really sure how they work.
Workflowy. You won't know what you're missing until you try it.

Offline AnonymousUser

  • Dansdeals Presidential Platinum Elite
  • ********
  • Join Date: Feb 2013
  • Posts: 3014
  • Total likes: 4
  • DansDeals.com Hat Tips 0
    • View Profile
Re: Programming for Beginners
« Reply #388 on: November 07, 2016, 02:13:58 PM »
How do I write a script to submit the request? I've never dealt with webhooks before and not really sure how they work.
A webhook is a service that takes an HTTP request and does something. That request is usually sent when an event is triggered and you want the webhook to be notified about it.
You need to find the API for the webhook, and then send a request using the appropriate format.
Google "js send http request" and ignore the jquery answers.
It's hard to give a more specific answer without more details.

Offline etech0

  • Dansdeals Lifetime 10K Presidential Platinum Elite
  • *******
  • Join Date: Dec 2013
  • Posts: 11412
  • Total likes: 1437
  • DansDeals.com Hat Tips 1
    • View Profile
  • Location: not lakewood
  • Programs: DDF
Re: Programming for Beginners
« Reply #389 on: November 07, 2016, 02:32:23 PM »
A webhook is a service that takes an HTTP request and does something. That request is usually sent when an event is triggered and you want the webhook to be notified about it.
You need to find the API for the webhook, and then send a request using the appropriate format.
Google "js send http request" and ignore the jquery answers.
It's hard to give a more specific answer without more details.
Got it - thanks! I'll give it a try and come back if I have questions
Workflowy. You won't know what you're missing until you try it.