-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
607 lines (313 loc) · 20.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Contrast Of Beauty</title>
<meta name="author" content="black@t">
<meta name="description" content="When I have started to use TypeScript I have looked at Definitely Typed to see how many people where writing declaration files (.d.ts) and then …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://blackat.github.io/">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/atom.xml" rel="alternate" title="Contrast Of Beauty" type="application/atom+xml">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="/javascripts/libs/jquery.min.js"%3E%3C/script%3E'))</script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="//fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,700italic,400,700,600' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Sorts+Mill+Goudy:400,400italic' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Roboto:400,700,700italic,500,500italic' rel='stylesheet' type='text/css'>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-59763266-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body >
<header role="banner"><hgroup>
<h1><a href="/">Contrast Of Beauty</a></h1>
<h2>I am just curious</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="https://www.google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="sitesearch" value="blackat.github.io">
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
<li><a href="/oo-design-principles">Design Principles</a></li>
<li><a href="/design-patterns">Design Patterns</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div class="blog-index">
<article>
<header>
<h1 class="entry-title"><a href="/blog/2016/09/11/furure-of-declaration-files/">Furure of Declaration Files</a></h1>
<p class="meta">
<time class='entry-date' datetime='2016-09-11T11:15:37+02:00'><span class='date'><span class='date-month'>Sep</span> <span class='date-day'>11</span><span class='date-suffix'>th</span>, <span class='date-year'>2016</span></span> <span class='time'>11:15 am</span></time>
| <a href="/blog/2016/09/11/furure-of-declaration-files/#disqus_thread"
data-disqus-identifier="http://blackat.github.io/blog/2016/09/11/furure-of-declaration-files/">Comments</a>
</p>
</header>
<div class="entry-content"><p>When I have started to use TypeScript I have looked at <a href="http://definitelytyped.org/">Definitely Typed</a> to see how many people where writing declaration files (<code>.d.ts</code>) and then <a href="https://typescript.codeplex.com/wikipage?title=Writing%20Definition%20%28.d.ts%29%20Files">guidelines from Microsoft</a> to see how to do it. There was then the utility <a href="https://github.com/DefinitelyTyped/tsd">tsd</a>, but now many stuff has changed.</p>
</div>
<footer>
<a rel="full-article" href="/blog/2016/09/11/furure-of-declaration-files/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2015/03/21/how-to-test-2-tdd-a-simple-example/">How to Test 2: TDD a Simple Example</a></h1>
<p class="meta">
<time class='entry-date' datetime='2015-03-21T12:37:14+01:00'><span class='date'><span class='date-month'>Mar</span> <span class='date-day'>21</span><span class='date-suffix'>st</span>, <span class='date-year'>2015</span></span> <span class='time'>12:37 pm</span></time>
| <a href="/blog/2015/03/21/how-to-test-2-tdd-a-simple-example/#disqus_thread"
data-disqus-identifier="http://blackat.github.io/blog/2015/03/21/how-to-test-2-tdd-a-simple-example/">Comments</a>
</p>
</header>
<div class="entry-content"><p>Test Driven Development (TDD) is a software development process based on the <em>test-first</em> approach of <a href="http://en.wikipedia.org/wiki/Extreme_programming">extreme programming</a>. Roughly the idea is creating tests before any implementation and then start development guided by test, finally refactor. We will quickly explore the technique and its <em>rhythm</em> to highlight advantages and disadvantages. <strong>DRAFT 1</strong></p>
</div>
<footer>
<a rel="full-article" href="/blog/2015/03/21/how-to-test-2-tdd-a-simple-example/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2015/03/07/how-to-test-1-find-errors-to-make-the-application-works/">How to Test 1: Find Errors to Make the Application Works</a></h1>
<p class="meta">
<time class='entry-date' datetime='2015-03-07T09:37:33+01:00'><span class='date'><span class='date-month'>Mar</span> <span class='date-day'>7</span><span class='date-suffix'>th</span>, <span class='date-year'>2015</span></span> <span class='time'>9:37 am</span></time>
| <a href="/blog/2015/03/07/how-to-test-1-find-errors-to-make-the-application-works/#disqus_thread"
data-disqus-identifier="http://blackat.github.io/blog/2015/03/07/how-to-test-1-find-errors-to-make-the-application-works/">Comments</a>
</p>
</header>
<div class="entry-content"><p>This is an <em>experiment tutorial</em> to better learn some <em>101</em> practices and how testing can be a better replacement of developing by debugging.</p>
<p>The goal of the <em>experiment-project</em> is to find, to correct bugs and make the application works by writing tests.</p>
</div>
<footer>
<a rel="full-article" href="/blog/2015/03/07/how-to-test-1-find-errors-to-make-the-application-works/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2015/02/01/javascript-anatomy-of-an-object/">JavaScript: Anatomy of an Object</a></h1>
<p class="meta">
<time class='entry-date' datetime='2015-02-01T11:27:38+01:00'><span class='date'><span class='date-month'>Feb</span> <span class='date-day'>1</span><span class='date-suffix'>st</span>, <span class='date-year'>2015</span></span> <span class='time'>11:27 am</span></time>
| <a href="/blog/2015/02/01/javascript-anatomy-of-an-object/#disqus_thread"
data-disqus-identifier="http://blackat.github.io/blog/2015/02/01/javascript-anatomy-of-an-object/">Comments</a>
</p>
</header>
<div class="entry-content"><p><strong>JavaScript</strong> is a <em>prototypal inheritance language</em> where objects inherit properties directly from other objects. Differently a <em>class-based languages</em> such as Java defines an object as instance of a class and inheritance hierarchy is defined through classes. Packages then define the layout of files and folders in a project.</p>
<p>Objects in JavaScript are <em>class-free</em> and <em>dynamic</em> or <em>mutable</em>, they can change at any time during code execution. In Java objects are not dynamic, their layout is lock down by class definition.</p>
<p>JavaScript defines a <em>prototype linkage feature</em> to allow an object to inherit properties from another object.</p>
</div>
<footer>
<a rel="full-article" href="/blog/2015/02/01/javascript-anatomy-of-an-object/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/12/11/kii-web-application/">Kii Web Application</a></h1>
<p class="meta">
<time class='entry-date' datetime='2014-12-11T19:32:27+01:00'><span class='date'><span class='date-month'>Dec</span> <span class='date-day'>11</span><span class='date-suffix'>th</span>, <span class='date-year'>2014</span></span> <span class='time'>7:32 pm</span></time>
| <a href="/blog/2014/12/11/kii-web-application/#disqus_thread"
data-disqus-identifier="http://blackat.github.io/blog/2014/12/11/kii-web-application/">Comments</a>
</p>
</header>
<div class="entry-content"><p>The current <strong>tut</strong> explore how to create a simple mobile application with HTML5, CSS3 and JavaScript based on the new Kii Javascript SDK. Basically Kii Corporation offers a rich cloud mobile backend to help the development of a mobile application providing some services out of the box such as user registration and login. Then the application will be wrapped by Apache Cordova to obtain a deployable app for iOS and Android in a hybrid fashion.</p>
<p><img class="center" src="/images/posts/genymotion-get-your-box.png"></p>
</div>
<footer>
<a rel="full-article" href="/blog/2014/12/11/kii-web-application/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/10/03/fullstack-javascript-web-application-part-2/">Fullstack Javascript Web Application Part 2</a></h1>
<p class="meta">
<time class='entry-date' datetime='2014-10-03T23:52:35+02:00'><span class='date'><span class='date-month'>Oct</span> <span class='date-day'>3</span><span class='date-suffix'>rd</span>, <span class='date-year'>2014</span></span> <span class='time'>11:52 pm</span></time>
| <a href="/blog/2014/10/03/fullstack-javascript-web-application-part-2/#disqus_thread"
data-disqus-identifier="http://blackat.github.io/blog/2014/10/03/fullstack-javascript-web-application-part-2/">Comments</a>
</p>
</header>
<div class="entry-content"><p>The single page web application will be enriched with a database support, a build system with dependencies management and a testing framework.</p>
<p><img class="center" src="/images/posts/popcorn-time-screenshot.png"></p>
<p><a href="http://gruntjs.com/" title="Grunt homepage">Grunt</a> task runner and <a href="bower.io" title="Bower homepage">Bower</a> package management system will be configured. Then <a href="http://www.mongodb.org/" title="MongoDB homepage">Mongodb</a> with a persistent model will be added, finally <a href="http://jasmine.github.io/" title="Jasmine homepage">Jasmine</a> and <a href="http://karma-runner.github.io/0.12/index.html" title="Karma homepage">Karma</a> will support tests and their execution.</p>
</div>
<footer>
<a rel="full-article" href="/blog/2014/10/03/fullstack-javascript-web-application-part-2/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/09/09/fullstack-javascript-web-application/">Fullstack Javascript Web Application Part 1</a></h1>
<p class="meta">
<time class='entry-date' datetime='2014-09-09T22:13:06+02:00'><span class='date'><span class='date-month'>Sep</span> <span class='date-day'>9</span><span class='date-suffix'>th</span>, <span class='date-year'>2014</span></span> <span class='time'>10:13 pm</span></time>
| <a href="/blog/2014/09/09/fullstack-javascript-web-application/#disqus_thread"
data-disqus-identifier="http://blackat.github.io/blog/2014/09/09/fullstack-javascript-web-application/">Comments</a>
</p>
</header>
<div class="entry-content"><p>The web application will allow the user to manage a list of movies, show them, update them, store new ones and delete existing ones.</p>
<p><img class="center" src="/images/posts/popcorn-time-screenshot.png"></p>
<p>This web application will help to show how to structure a full stack Javascript web application and which components are required to make it work.</p>
<p>The application will start simple and step by step components will be added such as the database, the testing framework, the task runner and the dependency management.</p>
</div>
<footer>
<a rel="full-article" href="/blog/2014/09/09/fullstack-javascript-web-application/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2013/05/31/synchronizers/">Synchronizers</a></h1>
<p class="meta">
<time class='entry-date' datetime='2013-05-31T05:54:00+02:00'><span class='date'><span class='date-month'>May</span> <span class='date-day'>31</span><span class='date-suffix'>st</span>, <span class='date-year'>2013</span></span> <span class='time'>5:54 am</span></time>
</p>
</header>
<div class="entry-content"><p>Synchonizers are high-level abstraction in order to synchonize activities of two or more threads.</p>
<p>The group of synchronizers includes:</p>
<ul>
<li><strong><a href="#semaphore">Semaphore.</a></strong> Controls access to one ore more shared resources.</li>
<li><strong><a href="#phaser">Phaser.</a></strong> Used to support a synchronization barrier.</li>
<li><strong><a href="#countdownlatch">CountDownLatch.</a></strong> Allows threads to wait for a countdown to complete.</li>
<li><strong><a href="#exchanger">Exchanger.</a></strong> Supports exchanging data between two threads.</li>
<li><strong><a href="#cyclicbarrier">CyclicBarrier.</a></strong> Enables threads to wait at a predefined execution point.</li>
</ul>
</div>
<footer>
<a rel="full-article" href="/blog/2013/05/31/synchronizers/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2013/05/21/factory-pattern/">Factory Pattern</a></h1>
<p class="meta">
<time class='entry-date' datetime='2013-05-21T22:17:00+02:00'><span class='date'><span class='date-month'>May</span> <span class='date-day'>21</span><span class='date-suffix'>st</span>, <span class='date-year'>2013</span></span> <span class='time'>10:17 pm</span></time>
</p>
</header>
<div class="entry-content"><h3>Introduction</h3>
<ul>
<li>An abstract factory method isolates the client from knowing what class is actually created.</li>
<li><strong>New</strong> operator means <em>directly instantiating</em> an object so <em>direct dependency on a concrete class</em>.
<ul>
<li>Code is not close to modification.</li>
</ul>
</li>
<li><strong>Interface and abstract class</strong> imply decoupling code from the actual object. If code is written to an interface it will work with any new class implementing that interface through polymorphism.</li>
<li><strong>Design principle.</strong> <a href="/oo-design-principles/index.html#inversion_principle">Dependency Inversion Principle.</a></li>
</ul>
</div>
<footer>
<a rel="full-article" href="/blog/2013/05/21/factory-pattern/">Read on →</a>
</footer>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2013/03/28/mvc-pattern/">MVC Pattern</a></h1>
<p class="meta">
<time class='entry-date' datetime='2013-03-28T22:42:00+01:00'><span class='date'><span class='date-month'>Mar</span> <span class='date-day'>28</span><span class='date-suffix'>th</span>, <span class='date-year'>2013</span></span> <span class='time'>10:42 pm</span></time>
</p>
</header>
<div class="entry-content"><blockquote><p>The MVC Pattern combines three patterns into a solution that separate the responsibilities in managing an interaction.</p><footer><strong>Bates and Sierra,</strong> <cite><a href='http://shop.oreilly.com/product/9780596007126.do'>Head First Design Patterns</a></cite></footer></blockquote>
</div>
<footer>
<a rel="full-article" href="/blog/2013/03/28/mvc-pattern/">Read on →</a>
</footer>
</article>
<div class="pagination">
<a class="prev" href="/posts/2">← Older</a>
<a href="/blog/archives">Blog Archives</a>
</div>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/blog/2016/09/11/furure-of-declaration-files/">Furure of Declaration Files</a>
</li>
<li class="post">
<a href="/blog/2015/03/21/how-to-test-2-tdd-a-simple-example/">How to Test 2: TDD a Simple Example</a>
</li>
<li class="post">
<a href="/blog/2015/03/07/how-to-test-1-find-errors-to-make-the-application-works/">How to Test 1: Find Errors to Make the Application Works</a>
</li>
<li class="post">
<a href="/blog/2015/02/01/javascript-anatomy-of-an-object/">JavaScript: Anatomy of an Object</a>
</li>
<li class="post">
<a href="/blog/2014/12/11/kii-web-application/">Kii Web Application</a>
</li>
</ul>
</section>
<section>
<h1>GitHub Repos</h1>
<ul id="gh_repos">
<li class="loading">Status updating…</li>
</ul>
<a href="https://github.com/blackat">@blackat</a> on GitHub
<script type="text/javascript">
$(document).ready(function(){
if (!window.jXHR){
var jxhr = document.createElement('script');
jxhr.type = 'text/javascript';
jxhr.src = '/javascripts/libs/jXHR.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(jxhr, s);
}
github.showRepos({
user: 'blackat',
count: 0,
skip_forks: true,
target: '#gh_repos'
});
});
</script>
<script src="/javascripts/github.js" type="text/javascript"> </script>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright © 2016 - black@t -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
var disqus_shortname = 'blackatblog';
var disqus_script = 'count.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = '//platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>