|
Yeah, the printed circuit board was terrible...I could have made something better than that
These days I just use a nice set of Audio Technica headphones and a nice headphone amp...was tired of people complaining about the noise
|
|
|
|
|
And done so with a dalo pen I'll bet!
DaveX86 wrote: nice set of Audio Technica headphones Ha! And here I was considering pointing out the difference in sound between transistors and valves.
DaveX86 wrote: was tired of people complaining about the noise Good-taste it seems, is like common-sense - not universal.
"When I was 5 years old, my mother always told me that happiness was the key to life. When I went to school, they asked me what I wanted to be when I grew up. I wrote down 'happy'. They told me I didn't understand the assignment, and I told them they didn't understand life." - John Lennon
|
|
|
|
|
I've been using Typescript over the past couple of days to build a new AngularJS app, and waow!
It is amazing!
If you work a lot with Javascript, and you haven't had a chance to play with Typescript, please check it out.
That is all!
|
|
|
|
|
I've been curious about Typescript, but have some colleagues that are against it based on what they know. Can you elaborate more on the "waow" factors, and arguments that you might make to someone who is skeptical or outright against using it?
|
|
|
|
|
Sure.
Well, first of all I am working with a .net back-end, so doing all of my coding in Visual Studio (2015 RC). Visual Studio 2015 + ReSharper + Web Essentials which provides a really nice environment for working with Typescript.
For my API, server side, I am using ServiceStack. ServiceStack have created a Visual Studio plugin to generate a DTO in Typescript based on your API. You write your API, run this program, and you have an interface for every Request and Response object in your API.
There is a Typescript project called DefinitelyTyped. It provides type definitions for all of the frameworks I am using, which for this project are:
- AngularJS
- Angular UI Router
- Angular UI Directives for Bootstrap
- AngularJS Toastr
This means that you can write your client side code in Typescript, and everything is strongly typed. Here is an AngularJS service I wrote earlier today in Typescript:
import CreateAdjustmentRequest = JobManager.Model.CreateAdjustmentRequest;
import AdjustmentResponse = JobManager.Model.AdjustmentResponse;
import HttpPromise = angular.IHttpPromise;
import GetAdjustmentRequest = JobManager.Model.GetAdjustmentRequest;
import GetAdjustmentsRequest = JobManager.Model.GetAdjustmentsRequest;
import UpdateAdjustmentRequest = JobManager.Model.UpdateAdjustmentRequest;
import DeleteAdjustmentRequest = JobManager.Model.DeleteAdjustmentRequest;
export class AdjustmentService {
httpService: angular.IHttpService;
constructor(httpService: angular.IHttpService) { this.httpService = httpService; }
getAdjustment(request: GetAdjustmentRequest):HttpPromise<AdjustmentResponse> {
return this.httpService.get('/adjustments/' + request.Id);
}
getAdjustments(request: GetAdjustmentsRequest): HttpPromise<AdjustmentResponse[]> {
return this.httpService.get('/adjustments/all/' + request.JobId);
}
createAdjustment(request: CreateAdjustmentRequest): HttpPromise<AdjustmentResponse> {
return this.httpService.post('/adjustments/create', request);
}
updateAdjustment(request: UpdateAdjustmentRequest): HttpPromise<AdjustmentResponse> {
return this.httpService.post('/adjustments/' + request.Id, request);
}
deleteAdjustment(request: DeleteAdjustmentRequest): HttpPromise<boolean> {
return this.httpService.delete('/adjustments/' + request.Id);
}
}
(() => angular.module('JobManager').service('AdjustmentService', ['$http', (http: angular.IHttpService) => {
return new AdjustmentService(http);
}]))();
How nice is that? You have all sorts of niceties from C# such as generics and lambda expressions, and everything you see is strongly typed. The colon syntax on method arguments is used to assign a type to an object. If you don't use this, then it's similar to a dynamic object in C#, and will compile no matter what you do. The colon syntax on a method itself is used to specify which type of object the method returns.
IHttpService comes from the AngularJS DefinitelyTyped library. The requests and responses have been generated by ServiceStack, based on the C# classes used. If you get anything wrong, then the project doesn't build and you can catch errors at compile time as opposed to run time.
Loving it all so far!
One of the core developers of Typescript is Anders Hejlsberg, who was also one of the core developers of C#. AngularJS 2 is build on TypeScript! This is a collaboration between Microsoft on Google, which is insanely cool! Asana is built with Typescript, as are a bunch of major SPA's.[^]
I'm not writing any more Javascript if I can avoid it.
modified 26-Jun-15 16:34pm.
|
|
|
|
|
#SupportHeForShe If your actions inspire others to dream more, learn more, do more and become more, you are a leader.-John Q. Adams
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
Only 2 things are infinite, the universe and human stupidity, and I'm not sure about the former.-Albert Einstein
|
|
|
|
|
Awesome writeup - thanks!
|
|
|
|
|
You should expand that into a tip, or even an article. That was good info.
|
|
|
|
|
I second this!
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
I've been wanting to look into TypeScript!
First check it out, then write a little blog about it and then last, but not least, convince the guys at work
Looking forward to the day my pure JavaScript days are over
|
|
|
|
|
|
|
It worked...
amazing did not know about that...
Thank you!
|
|
|
|
|
You're welcome!
while (true) {
continue;
}
|
|
|
|
|
Done a small tip of that...
Of course you are mentioned there.
Thank you again!
|
|
|
|
|
Glad to have helped
Maybe you could state the error number (0x80070663) in a tag, or inside your tip, so that it could be retrieved more easily by search engines?
while (true) {
continue;
}
|
|
|
|
|
Also had the same problem. Thanks!
|
|
|
|
|
Automatic Corruptdates.
Gotta love em, surely don't need em.
Y'all should know better.
|
|
|
|
|
|
"OTD" usually implies today's comic, or at least a fairly recent one. Not one that was posted in August 2011!
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I will not beg your pardon, Master Elrond, for my implied misuse of the OTD etiquette, protocol, decorum, policies and procedures, for had I meant of "XKCD Of Today" I obviously would have titled it XKCDOT...
But actually thank you for helping me realize that my acronym does leave much room for improvement as actually I posted it in the spirit of "XKCD That I Just Recently Discovered That Was Especially Poignant To The Current Work I Am Doing In The Area of Authentication, Encryption, Cryptography and Security Heuristics That I Decided To Post In The Lounge Today", which would rightfully result in XKCDTIJRDTWEPTTCWIADITAOAECASHTIDTPITLT
Thanks for catching that...
"... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute
"Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning. - gavindon
|
|
|
|
|
OK then. So long as we're clear on that.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
"... having only that moment finished a vigorous game of Wiff-Waff and eaten a tartiflet." - Henry Minute
"Let's face it, after Monday and Tuesday, even the calendar says WTF!" - gavindon
Programming is a race between programmers trying to build bigger and better idiot proof programs, and the universe trying to build bigger and better idiots, so far... the universe is winning. - gavindon
|
|
|
|
|
Richard Deeming wrote: OTD Depends on perspective. Of the day could be relative to CP.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
This is the XKCD OTD[^]
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|