25 karma · joined Jun 6, 2013 (13y ago) · 39 submissions
http://declandewet.com @declanjdewet on Twitter @declandewet on Github
comment 11y ago · link · parent
comment 11y ago · link · parent
comment 11y ago · link · parent
Something useful I've seen in very few places are video players that maintain a history of the duration of the video that was watched, so if the internet ever cuts out or the video stops loading the page could just be reloaded and the duration in the video will be maintained, albeit 1 minute prior just as a quick recap of what happened. When this feature is not available, and the connection is shoddy, watching videos can be very frustrating because having to find where you were previously can sometimes take ages, especially if the loading bar has no indication of what duration in minutes the video is at the location you hover your mouse on the loading bar.
What else other than this could add any real value to the act of searching a video? Perhaps mapping words to visual cues, for example searching "helicopter explosion" would take you directly to an overdramatic scene of a helicopter being blown up in magnificent ember by a missile that is clearly too small to do much damage to a bicycle let alone a helicopter, that would be cool.
comment 12y ago · link · parent
Also, it might be worth looking at ng-annotate so you don't have to specify the array of dependencies. It's not necessary but it does help speed up development a little bit, not having to type that out all the time - it can get quite unruly sometimes. :P
Further than that, you need to implement unit testing, as well as end-to-end testing with Angular Protractor. I've been on a large scale Angular project without any testing in place, and boy did I give the lead my two cents about how much trouble that caused us. The project was delivered 2 weeks late because of buggy, untested code. Prevent this as soon as you can.
comment 12y ago · link · parent
Learning more about the language is always going to help, though. I would suggest doing the CodeCademy track a second time to see if you've improved. Focus on writing efficient solutions that are better than what you would have done your first time around. Once that is done, give these resources a go:
- http://codeschool.com - http://lynda.com - http://teamtreehouse.com
I would also suggest purchasing these books, as they are somewhat the standard learning and reference resources:
- JavaScript: The Good Parts - JavaScript: The Definitive Guide
There are other books that will help tremendously, and a list of free ones can be found at http://jsbooks.revolunet.com
Other books I recommend:
- Eloquent JavaScript - Effective JavaScript - High Performance JavaScript - Maintainable JavaScript - Principles of Object-Oriented Programming in JavaScript - JavaScript Patterns - The Past, Present and Future of JavaScript - JavaScript Enlightenment - Secrets of the JavaScript Ninja
comment 12y ago · link · parent
All that being said, there are definitely ways to gain the same functionality using a utility library like Underscore (or the much-faster-than-underscore Lodash). Instead of `array.forEach` it's simply `_.forEach(array, function(item) { });` - http://lodash.com/docs#forEach
comment 12y ago · link · parent
comment 12y ago · link · parent
If you want to start a business, then start one. If it's a software business, learn to code however you want or do not learn to code at all. You already know marketing, you already have experience in a startup environment, the only key things to follow now would be to find a product idea and iterate, iterate, iterate.
Note that I said "find" a product idea and not "think of a product idea". Thinking of one is a waste of time, because that requires that you spend valuable time finding a target market and then more time finding product/market fit through market evaluation & validation. Rather find an industry of easily contactable people, and ask them what pains them about their job. By doing so, you will have identified a problem as well as the market validation of the solution to that problem. From there you can come up with a product, which you can use to wireframe. Discuss the idea with your chosen businesses, get their feedback and ask if they would pay for it. Verbal financial commitment = done. Some might even invest. All that's left to do is hire the people to build it and the rest is all up to your skills and experience.
If you want to instead study, rather than create your own startup - heed this warning: You get what you pay for. That being said, you can easily learn material online, as a degree in tech is not necessarily important in tech (you're already qualified, and that is at least something that puts you ahead of many others). I wouldn't recommend sound design and music production - all of my DJ friends (amateur or professional) don't even have a day of high-school level musical education to their names. Some have a knack for it, others don't.
If you just want to pay the bills, then get a job. I've found that asking previous employers for a simple paragraph of how, in any way, I benefited the company - and use that in a resume under your the work history section, does help get you that little bit farther.
What you should NOT do under any circumstance is delay. You are not getting any younger and money don't grow on trees - get up, get out, and do something to get you back in the system.
comment 12y ago · link · parent
The requirements for obtaining one involve having an industry-relevant qualification from a U.S. college or the international equivalent (which is a qualification + work experience) and the company needs to offer proof of sponsorship for the applicant (which means they kind of need to prove that hiring you over a U.S. citizen with the same qualifications is the only way forward).
A good way to go about this is to find a company that is active on Github with open source who have created any kind of framework that they use internally. Get your friend to learn the framework and he will then have a huge advantage over any equally-qualified person who does not have knowledge in the framework.
comment 13y ago · link · parent
This country needs to change. Here we are, almost twenty years down the line from stopping our racist ways, and yet we've arrived at this.
The current government needs to get it's head out of it's ass and stop spending what little tax money we have on their big fat mansions.
I was born in 1993, so I am by no means an expert on Apartheid, nor do I have any experience with it - but after twenty years, surely you'd think things would have changed?
I visited Cape Town before and after the DA. After the DA got hold of it, it feels like an entirely separate country. No potholes from Kimberly to Cape Town. There are street cleaning machines. Free wifi in so many places. Accommodation is cheap now (a 10 bedroom 7 bathroom apartment prefurbished with water + electricty for R3500 a month. in Camps Bay was on sale). In my entire stay there I encountered 0 homeless people. And young people, especially white people, are opening businesses there, and creating jobs - despite Black Economic Empowerment.
And then we have the ANC...
comment 13y ago · link · parent
13.
South Africa's ANC's disgustingly racist political propoganda campaign(puu.sh ↗)
3 points · by declandewet · 13y ago · 4 comments
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
comment 13y ago · link · parent
One reason I choose Node over Ruby/Rails is the Websocket libraries available in Node. Here's an example of why: I've been exploring a lot of JavaScript lately. Backbone.js is nice, but it doesn't have nice data-binding. Angular.js is really nice, but it's "templates" (directives) cannot be parsed by a server, so you couldn't serve the same content from the server. Ember is nice, but it's a little slow compared to the other frameworks (from my experience with it, I know it will improve).
I prefer Backbone + Handlebars because I can serve the same templates as views from the server if I adhere to a rule that essentially means each page of the app is a separate Backbone template associated with it's own view. These can still have subviews, but the client will handle that. The only thing I don't like is the data binding.
So, lately in my apps, I've found myself writing simple data binding "plugins". But instead of detecting regular events - I bring socket.io into the mix. This makes for really fast data binding, plus everyone can see the changes.
Having everything in JavaScript prevents me from straying between different programming languages and distracts me less, and for the socket work it just makes so much more sense to me.
comment 13y ago · link · parent
comment 13y ago · link · parent
I'm not advocating the use of one over the other for you (personally I'd go with Node because my expertise in it outweighs my expertise in Python), I'm simply stating my opinion that these are not valid reasons to disregard the technology. The Node.js community is bustling, the amount of modules available on NPM are in the tens of thousands, and many open source projects use it (Yeoman, Grunt, Stylus, Jade, Roole, LESS, Bower, CoffeeScript to name a few).
Development speed is likely the most probable of your points, but even so - you can write a Node.js app in CoffeeScript, which you might be more inclined to do since your love of Python is so prominent, and CoffeeScript borrows many ideas from Python, such as significant whitespace and chained comparisons. A manual compile step isn't necessary as this feature can be done by most IDE's implicitly. Express.js also helps big time.
The only reason I would use Python over Node (if I was in your position and actually knew enough Python) would be if the web app in question required intensive mathematical or scientific calculations - Python would shine over Node in that respect.
comment 13y ago · link · parent
app.get('/dashboard', ensureAuthenticated(), function(req, res) { });
Your ensureAuthenticated function would look like this:
function ensureAuthenticated(req, res, next) { if (req.isAuthenticated()) { next(); } else { res.send('You are not authorized to access this page.'); } }
Passport provides a few of these utility middlewares out of the box. It seems intimidating at first and I could spend a long time explaining it, but it would be much better just to dive in and give it a try. You can even head over to their IRC, which is #passportjs if I remember correctly, and ask which strategy would be best for your application and get started from there.
comment 13y ago · link · parent
He also mentions that if you just want API authentication then Passport has two sibling projects for that purpose - OAuthorize and OAuth2orize.
You would most likely be using bearer tokens issued by OAuth2 to implement this, and Passport supports this pretty well, with the bonus that it's actively maintained: https://github.com/jaredhanson/passport-http-bearer
comment 13y ago · link · parent