Thursday, December 31, 2015
Programmers resolutions - things to work on 12 month
http://matt.might.net/articles/programmers-resolutions/
Tuesday, December 29, 2015
Monday, December 21, 2015
Thursday, December 10, 2015
Визуализация на монотонном фоне
Пример: стена из белого кафеля мелкими квадратиками
props: проще визуализировать
Saturday, November 21, 2015
Fallacies of distributed computing - Wikipedia
Fallacies of distributed computing - Wikipedia, the free encyclopedia:
The fallacies of distributed computing are a set of assumptions that L Peter Deutsch and others at Sun Microsystems originally asserted programmers new to distributedapplications invariably make. These assumptions ultimately prove false, resulting either in the failure of the system, a substantial reduction in system scope, or in large, unplanned expenses required to redesign the system to meet its original goals.
The fallacies of distributed computing are a set of assumptions that L Peter Deutsch and others at Sun Microsystems originally asserted programmers new to distributedapplications invariably make. These assumptions ultimately prove false, resulting either in the failure of the system, a substantial reduction in system scope, or in large, unplanned expenses required to redesign the system to meet its original goals.
The fallacies are summarized below:
The Seven Wastes of Software Development
The Seven Wastes of Software Development:
Mary and Tom Poppendieck later translated these seven wastes into "The Seven Wastes of Software Development":
- Partially Done Work
- Extra Features
- Relearning
- Handoffs
- Delays
- Task Switching
- Defects
Wednesday, November 18, 2015
Saturday, October 24, 2015
Wednesday, October 7, 2015
TODO: Create list of 10 algorithms to implement every 6 month
Create list of 10 favorite algorithms to implement every 3-6 month.
Implement in different languages.
Implement every n month
Notice/review changes in implementation speed quality.
Publish on github
Implement in different languages.
Implement every n month
Notice/review changes in implementation speed quality.
Publish on github
TODO: Create list of non trivial programming to implement every 6 month
Create list of 10 non trivial programming problems to implement
Implement them in different languages.
Save impl in github
Re-implement every 3-6 month. Review changes in implementation.
Implement them in different languages.
Save impl in github
Re-implement every 3-6 month. Review changes in implementation.
Started mongodb and node js course at mongo university
This is my 2nd or 3rd attempt on that course
https://university.mongodb.com/courses/M101JS/about
https://university.mongodb.com/courses/M101JS/about
Started course Algorithms Design And Analysis Part 1 (Stanford)
This is my 3rd attempt to complete this course
https://www.coursera.org/course/algo
https://www.coursera.org/course/algo
Sunday, September 27, 2015
AppNexus meetup
AppNexus meetup
2009
akka model
other concurency models
thread
process
futures (no state)
CSP(channels)
actor is persistent (exist even dont do anything )
has internal state
create actors
receive messages and do something
send message
process 1 message at a time (has inbox queue)
w: mutex (lock)
w: race conditions
'Best effort' delivery
at-most-once delivery
message can take arbitrary long time to deliver
no message order garantee
Has address
indentifies an actor or balancer
may represent proxy forwarder or actor
location transperency
address can be remote
actor can have many addresses
supervision - monitors state of actor (usually other actor)
Supervision tree
address dont change on restart
mailbox is persistent outside of actor
you can kill actor and inbox will be persistent
use cases:
processing pipeline
streaming data
multi-user concurrency
system hight uptime requirements (ericson)
apps with shared state
breaking up the work for many actors
anti-use cases:
performance critical applications
non concurrent
synchronous and stateless
2009
akka model
other concurency models
thread
process
futures (no state)
CSP(channels)
actor is persistent (exist even dont do anything )
has internal state
create actors
receive messages and do something
send message
process 1 message at a time (has inbox queue)
w: mutex (lock)
w: race conditions
'Best effort' delivery
at-most-once delivery
message can take arbitrary long time to deliver
no message order garantee
Has address
indentifies an actor or balancer
may represent proxy forwarder or actor
location transperency
address can be remote
actor can have many addresses
supervision - monitors state of actor (usually other actor)
Supervision tree
address dont change on restart
mailbox is persistent outside of actor
you can kill actor and inbox will be persistent
use cases:
processing pipeline
streaming data
multi-user concurrency
system hight uptime requirements (ericson)
apps with shared state
breaking up the work for many actors
anti-use cases:
performance critical applications
non concurrent
synchronous and stateless
Sunday, September 20, 2015
Monday, September 7, 2015
ES6 - Next Javascript
1. Proper tail call (recursion without using caller scope)
tail call - last instruction should be a fun without using caller scope
close call
tail position
max recursion number ~10,000 in ES5
2. Temporal Temp Zone- trows error
3. google traceur-compiler
https://google.github.io/traceur-compiler/demo/repl.html#
there is cmd tool
4. Rest parameters
fun (a, b, ...rest) {
}
4. Spead operator
5. Distructing object
let {name, age} = obj;
fun({name, age}) {}
5.1 Refutable pattern:
let {name:firstName = 'Unknown', age, ?phone} = user;
let ?{name, age, pone} = user;
#irefutable/refutable - undeclared, undefined
let ?{x:a=1} = undefined
let {?x:a=1} = {}
5.2 Destructing array
in method signature: fun([a, b, ...rest]) {}
var [a, b, ?c] = [1,2];
var ?[a, c] = [];
tail call - last instruction should be a fun without using caller scope
close call
tail position
max recursion number ~10,000 in ES5
2. Temporal Temp Zone- trows error
3. google traceur-compiler
https://google.github.io/traceur-compiler/demo/repl.html#
there is cmd tool
4. Rest parameters
fun (a, b, ...rest) {
}
4. Spead operator
5. Distructing object
let {name, age} = obj;
fun({name, age}) {}
5.1 Refutable pattern:
let {name:firstName = 'Unknown', age, ?phone} = user;
let ?{name, age, pone} = user;
#irefutable/refutable - undeclared, undefined
let ?{x:a=1} = undefined
let {?x:a=1} = {}
5.2 Destructing array
in method signature: fun([a, b, ...rest]) {}
var [a, b, ?c] = [1,2];
var ?[a, c] = [];
6. Arrow functions
Laravel vagrant laravel/homestead (ssh issue)
Issue:
trying to ssh, ssh timeout, password was not set for vagrant username
cred: vagrant@vagrant
config.ssh.username = 'vagrant'
config.ssh.password = 'vagrant'
config.ssh.insert_key = 'true' #this will insert public ssh key to authorized_hosts
https://laracasts.com/discuss/channels/general-discussion/fortgot-vagrant-password
http://stackoverflow.com/questions/25758737/vagrant-login-as-root-by-default
Friday, July 24, 2015
ScriptEd.org - NY JavaScript Meetup
scripted.org - преподавание детям в школах программирования (from NY JavaScript Meetup , Andrew from condenast.com ). Работа волонтера.
!! Хорошо для саморазвития
!! Можно познакомиться с интересными полезными профессионалами энтузиастами
!! Хорошо для саморазвития
!! Можно познакомиться с интересными полезными профессионалами энтузиастами
nodeschool.io, NY JavaScript Meetup
nodeschool.io - интересный ресурс.
Доступны различные курсы (workshops)
Для этого надо устоновить package: npm install -g <workshop name>
Запустить: <workshop name> -l en
Прочитеть описание задания и теорию
Выполнить задание
Проверить задание: >/ <workshop name> verify program.js
!! Если не копировать задания а перепечатывать развивает внимательность и лучше все запоминается.
Доступны различные курсы (workshops)
Для этого надо устоновить package: npm install -g <workshop name>
Запустить: <workshop name> -l en
Прочитеть описание задания и теорию
Выполнить задание
Проверить задание: >/ <workshop name> verify program.js
!! Если не копировать задания а перепечатывать развивает внимательность и лучше все запоминается.
Thursday, July 23, 2015
Meetup NY Javascript / Node School
http://www.meetup.com/NY-JavaScript/events/223504152/
http://nodeschool.io/#workshopper-list
Presentation
https://www.scripted.org/
http://www.condenast.com/
http://nodeschool.io/#workshopper-list
Presentation
https://www.scripted.org/
http://www.condenast.com/
Monday, June 29, 2015
Sunday, June 14, 2015
Globaldev coding standards
https://github.com/globaldev/standards
There are general programming principles, security principles, code review principal etc
Composition aggregation association
http://stackoverflow.com/questions/21967841/aggregation-vs-composition-vs-association-vs-direct-association
Composition - one obj is part of another. One does not exists outside another
Aggregation - one object uses another ( setters dependency injection)
Temporary assosiation ( method param , return value)
Delegation ?
Weak/strong assotiation
Books to check out
From habrahabr
http://www.yegor256.com/2015/04/22/favorite-software-books.html
Coding best practices and antipatterns
Add here robs articles he sent to dv@estidesign
Thourally anilyze article outline main ideas
Saturday, June 13, 2015
Friday, June 12, 2015
ADP's Inovation Labs second interview
Прошло второе интервью в ADP. На мой взгля удачнее чем первое.
Interview questions:
General questions:
1. Tell me about yourself.
2. Question about previous job, working experience.
What are you doing there?
What are your role there?
What stack you use?
Most challenging thing you dealt with?
Most exiting ...?
What product(s) you developing now on you current job?
What is(are) it(their) architecture ?
TECHNICAL QUESTIONS
Language specific
3. console.log(1)
setTimeout(function() { console.log(2)}, 2000)
setTimeout(function() { console.log(3)}, 0)
console.log(4)
4. Give me definition of closure
5. var arr = [1,2,3,4]
for (var i = 0; i < val.length; i++) {
setTimeout(function() {
console.log(i+1, arr[i])
}, 1000)
}
What it will output.
After you give answer.
How to solve the issue.
Clue: do you familiar with term immediately-invoked function
Algorithmic Questions
6. Given array ansorted distinct with all elemnts from range 1..99. One number is missing.
Find out which one.
Possible question if you use brute force methods: how to optimize and reduce run
If using sorting which algorithm. What is it complexity.
Patterns Methodology Paradigms Concepts
7. Do you familiar with callback hell term?
How can you deal with it?
Architecture Questions
8. Related to designing Resfull APIs (question based on my resume and working experience)
How did you solve api versioning problem in your api?
What are http methods
When you use POST, PUT
What difference of passing params btw GET and POST
If you need to get something from db can you use POST method
Diff btw POST PUT PATCH
9. What are advantages of using node.js ?
Devop Questions
13. Do you have devops skills
Do you use Task Runner like Grunt ?
14. What deployment system do you use?
General final questions.
15. What makes you good candidate for this position
16. How do you see your future as a professional
In what areas, directions you see yourself going, growing as a professional
17. What are qualities, flaws you thing you should work on.
18. Do you have any questions to me ?
Interview questions:
General questions:
1. Tell me about yourself.
2. Question about previous job, working experience.
What are you doing there?
What are your role there?
What stack you use?
Most challenging thing you dealt with?
Most exiting ...?
What product(s) you developing now on you current job?
What is(are) it(their) architecture ?
TECHNICAL QUESTIONS
Language specific
3. console.log(1)
setTimeout(function() { console.log(2)}, 2000)
setTimeout(function() { console.log(3)}, 0)
console.log(4)
4. Give me definition of closure
5. var arr = [1,2,3,4]
for (var i = 0; i < val.length; i++) {
setTimeout(function() {
console.log(i+1, arr[i])
}, 1000)
}
What it will output.
After you give answer.
How to solve the issue.
Clue: do you familiar with term immediately-invoked function
Algorithmic Questions
6. Given array ansorted distinct with all elemnts from range 1..99. One number is missing.
Find out which one.
Possible question if you use brute force methods: how to optimize and reduce run
If using sorting which algorithm. What is it complexity.
Patterns Methodology Paradigms Concepts
7. Do you familiar with callback hell term?
How can you deal with it?
Architecture Questions
8. Related to designing Resfull APIs (question based on my resume and working experience)
How did you solve api versioning problem in your api?
What are http methods
When you use POST, PUT
What difference of passing params btw GET and POST
If you need to get something from db can you use POST method
Diff btw POST PUT PATCH
9. What are advantages of using node.js ?
10. What diff btw relational and not relational db. Props cons? In which cases would you use non relational dbs.
11. How many processes threads node js use when processing multiple requests ?
11. How many processes threads node js use when processing multiple requests ?
12. Have u ever made a decisions what technology choose in your project ?
What it was ? Why ?
13. Do you have devops skills
Do you use Task Runner like Grunt ?
14. What deployment system do you use?
General final questions.
15. What makes you good candidate for this position
16. How do you see your future as a professional
In what areas, directions you see yourself going, growing as a professional
17. What are qualities, flaws you thing you should work on.
18. Do you have any questions to me ?
Thursday, June 11, 2015
Quick-sort
https://class.coursera.org/algo-006/lecture/23
Algorithms: Tree traversal, Depth-first-search (DFS), Breadth-first-search (BFS)
http://en.wikipedia.org/wiki/Depth-first_search
http://en.wikipedia.org/wiki/Tree_traversal
http://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search
Q: how to invert binary tree?
DO: pascal triangle problems
DO: cases using stacks
DO:Graph algs
LRN: Quick sort, insert sort, bobble sort, selection sort, binary tree search
graph search.
http://en.wikipedia.org/wiki/Tree_traversal
http://en.wikipedia.org/wiki/Iterative_deepening_depth-first_search
Q: how to invert binary tree?
DO: pascal triangle problems
DO: cases using stacks
DO:Graph algs
LRN: Quick sort, insert sort, bobble sort, selection sort, binary tree search
graph search.
Code Katas
Code katas:
http://www.codekatas.org/
http://www.codingdojo.org/cgi-bin/index.pl?KataCatalogue
http://codekata.com/
https://laracasts.com/series/code-katas-in-php
http://en.wikipedia.org/wiki/Kata_(programming)
Also see
how to get job in facebook
Code problems:
http://www.careercup.com/page
http://www.codekatas.org/
http://www.codingdojo.org/cgi-bin/index.pl?KataCatalogue
http://codekata.com/
https://laracasts.com/series/code-katas-in-php
http://en.wikipedia.org/wiki/Kata_(programming)
Also see
how to get job in facebook
Code problems:
http://www.careercup.com/page
Wednesday, June 10, 2015
Coding exercises problems (from facebook interview email)
A few coding samples (from facebook interview email)
Tuesday, May 12, 2015
Top-5 certifications for every PHP programmer | A day in the life of…
Top-5 certifications for every PHP programmer | A day in the life of…: "Zend PHP 5
Linux LPI 101
Linux LPI 102
Ubuntu LPI 199
Zend PHP 5.3
Zend Framework
Linux LPI 201
Linux LPI 202
MySQL 5.0 developer I
MySQL 5.0 developer II
MySQL 5.0 administrator I
MySQL 5.0 administrator II"
'via Blog this'
Linux LPI 101
Linux LPI 102
Ubuntu LPI 199
Zend PHP 5.3
Zend Framework
Linux LPI 201
Linux LPI 202
MySQL 5.0 developer I
MySQL 5.0 developer II
MySQL 5.0 administrator I
MySQL 5.0 administrator II"
'via Blog this'
9 Anti-Patterns Every Programmer Should Be Aware Of
http://sahandsaba.com/nine-anti-patterns-every-programmer-should-be-aware-of-with-examples.html
Sunday, May 10, 2015
Sheduling artisan commands
Find app/console/Kernel.php@shedule method
...
$shedule->command('namespace:command_name')->daily();
...
Artisan CLI - Laravel - The PHP Framework For Web Artisans: " Guzzle 5 "
...
$shedule->command('namespace:command_name')->daily();
...
Artisan CLI - Laravel - The PHP Framework For Web Artisans: " Guzzle 5 "
guzzle/guzzle - Php library for http request inclidng async
Used in Laravel 5
$shedule->command('mycommands:dosomething')->thenPing('http:\\somehost\api\event');
$shedule->command('mycommands:dosomething')->thenPing('http:\\somehost\api\event');
Monday, May 4, 2015
Ruby tutorial
http://www.tutorialspoint.com/ruby/ruby_methods.htm
Sunday, May 3, 2015
Scala Language
https://www.coursera.org/course/progfun
https://class.coursera.org/reactive-002
https://class.coursera.org/reactive-002
Saturday, May 2, 2015
FullStackAcademy
$15.000 semester
Node.js/express Angular, html5, CSS3
http://www.fullstackacademy.com/flex-immersive
Thursday, April 30, 2015
php - Calling the variable property directly vs getter/setters - OOP Design - Stack Overflow
php - Calling the variable property directly vs getter/setters - OOP Design - Stack Overflow:
abstract class Object
{
public function __call($method, $args)
{
$key = '_' . strtolower(substr($method, 3, 1)) . substr($method, 4);
$value = isset($args[0]) ? $args[0] : null;
switch (substr($method, 0, 3)) {
case 'get':
if (property_exists($this, $key)) {
return $this->$key;
}
break;
case 'set':
if (property_exists($this, $key)) {
$this->$key = $value;
return $this;
}
break;
case 'has':
return property_exists($this, $key);
break;
}
throw new Exception('Method "' . $method . '" does not exist and was not trapped in __call()');
}
}
ALGORITHMS: DESIGN AND ANALYSIS, PART
https://www.coursera.org/course/algo
https://www.coursera.org/course/algo2
http://online.stanford.edu/courses/algorithms-spring-2014
http://online.stanford.edu/course/algorithms-design-and-analysis-part-2-0
https://www.coursera.org/course/algo2
http://online.stanford.edu/courses/algorithms-spring-2014
http://online.stanford.edu/course/algorithms-design-and-analysis-part-2-0
Wednesday, April 29, 2015
Learning JavaScript Design Patterns
[http://addyosmani.com/resources/essentialjsdesignpatterns/book/]
https://github.com/addyosmani/essential-js-design-patterns
https://github.com/addyosmani/essential-js-design-patterns
Events vs Hooks
Events vs Hooks
[http://programmers.stackexchange.com/questions/237876/what-should-plugins-use-hooks-events-or-something-else]
Hooks loose coupling, event - tight coupling.
Hooks: generic api for all hooks
Hooking - In computer programming, the term hooking covers a range of techniques used to alter or augment the behavior of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components. Code that handles such intercepted function calls, events or messages is called a "hook".
[http://programmers.stackexchange.com/questions/237876/what-should-plugins-use-hooks-events-or-something-else]
Hooks loose coupling, event - tight coupling.
Hooks: generic api for all hooks
Hooking - In computer programming, the term hooking covers a range of techniques used to alter or augment the behavior of an operating system, of applications, or of other software components by intercepting function calls or messages or events passed between software components. Code that handles such intercepted function calls, events or messages is called a "hook".
Projects to implement (from ESTI)
1. Create library for reports based on eloquent. and subscr reports
2. Library for auto-reports
3. Library for configs based on qb integration configs: array, yml, mixed, with extension and aggre
4. How to use Laravel event standalone
5. Laravel Events like in qb integration. traits. class::on(), class::fire(); class event subscriber
6. Create class for periods based on carbon: with iteration; formatting; etc
2. Library for auto-reports
3. Library for configs based on qb integration configs: array, yml, mixed, with extension and aggre
4. How to use Laravel event standalone
5. Laravel Events like in qb integration. traits. class::on(), class::fire(); class event subscriber
6. Create class for periods based on carbon: with iteration; formatting; etc
Cyclomatic complexity and NPath complexity
[http://www.codingswag.com/cyclomatic-and-npath-complexity-explained/]
[http://www.codingswag.com/cyclomatic-and-npath-complexity-explained/]
Saturday, April 25, 2015
Wednesday, April 15, 2015
Wednesday, April 8, 2015
Saturday, February 14, 2015
Thursday, February 12, 2015
JavaScript Patterns
http://shichuan.github.io/javascript-patterns/
var a = 1
, b = 2
, sum = a + b
, myobject = {}
, i
, j;
var global = (function () {
return this || (1, eval)('this');
}());
var getData = function getData () {
};
var a = 1
, b = 2
, sum = a + b
, myobject = {}
, i
, j;
var global = (function () {
return this || (1, eval)('this');
}());
var getData = function getData () {
};
Saturday, January 31, 2015
SMS-REST, EMAIL-REST Proxy
Разработать итрерфейс для sms сообщений который будет перенаправляться в REST-full API
Пример:
REST: some-app/books/find?author='Tolstoy'&name='Voina i Mir'
SMS: some-app.books.find author: Tolstoy name: Voina i Mir
- Use google voice as sms gate.
- Bind phone and app and bind incomming phone with user
- Think how to deal with captchas ? Dbc?
- Use YAML as basic syntax for requests and function data schema defenitions.
- Response will be sent back to the same number in YAML like format
- User ruby function call syntax:
E.g: books.store name: Onegin, author: Pushkin, note: This is a very good book. | I realy liked it.
| - new line symbol.
- Possible use of other sms gateways
- Implement the same for email. same sintax. Bind email and
- Sdelat' mobile app
- Try other sms gates
---------
Try to make watsup-rest proxy, facebook-rest proxy, vk-rest proxy
Пример:
REST: some-app/books/find?author='Tolstoy'&name='Voina i Mir'
SMS: some-app.books.find author: Tolstoy name: Voina i Mir
- Use google voice as sms gate.
- Bind phone and app and bind incomming phone with user
- Think how to deal with captchas ? Dbc?
- Use YAML as basic syntax for requests and function data schema defenitions.
- Response will be sent back to the same number in YAML like format
- User ruby function call syntax:
E.g: books.store name: Onegin, author: Pushkin, note: This is a very good book. | I realy liked it.
| - new line symbol.
- Possible use of other sms gateways
- Implement the same for email. same sintax. Bind email and
- Sdelat' mobile app
- Try other sms gates
---------
Try to make watsup-rest proxy, facebook-rest proxy, vk-rest proxy
Thursday, January 29, 2015
Naming conventions: camelCase versus underscore_case ? what are your thoughts about it? - Programmers Stack Exchange
Source>> stackexchange forum
Some comment: Absolutely agree it bothers me too
1. call to action notation - first word is action in lower case then camel case
collection->findFirst(...)
obj->getName()
2. No action method naming
App::log()
DB::table('users')->lastMonth()->get()
I like when lower case part is either proverb or adjective
e.g
lastMonth
firstElement
xmlPath
In method camel case first lwcase word should be specification
and last one the most general one eg (object type)
Functions:
1. Javascript style
function onSaveHanlder
2. PHP/Ruby style
send_email()
CSS
1. hyphen/slug style
class="save-btn"
id="header-container-section" // logic structure: first root element then child then child-child
Summary:
In general I like ruby naming convention and ruby approach for naming:
-readability
-clarity
-conciseness (short better then long without lose of clarity)
Not sure about snake case methods: I would use it only for properties instead of getter setter
Private fields should be prefixed with underscore :
eg: private $_items;
Both!
I do a lot of development in CakePHP, and I use either
CamelCase
or $underscored_vars
, in the following fashion (even outside CakePHP Projects):- filenames —
/lowercased_underscored.php
Typical, but worth mentioning. - classes —
class CamelCase extends ParentObject
. Note that, when usingCamelCase
, the initial character is not lowercase. I findcamelCase
to look really weird. - variables —
$are_variables_underscored === TRUE;
- variables that hold instances —
$CamelCase = new CamelCase();
//seen it in qb lib but in some languages like ruby everything is a class - array keys —
$collection['underscored_keys'];
- constants — I think everyone can agree that constants should be
ALL_CAPS_AND_UNDERSCORED
. - methods —
$CamelCase->foo_method_underscored();
- static methods —
CamelCase::just_like_regular_methods();
Some comment: Absolutely agree it bothers me too
have to agree with you, having the first character be lower case drives me crazy! I hate camelCase with a passion. – HLGEM Jan 6 '11 at 22:00
|
For programming languages I've used, like Java, Python, C++, I've adopted a clear format:
- ClassNamesArePascalCase
- methodNamesAreCamalCase
- variable_names_are_underscore
- CONSTANT_VARIABLES_ARE_CAPITAL_VARIABLES
- _private_variable_names_are_prefixed_with_an_underscore
- _PRIVATE_CONSTANT_VARIABLES_ARE_PREFIXED_WITH_AN_UNDERSCORE
Another aspect of naming convention is words order:
1. ModelCallReport or CallReportModel
create_date or date_create
In PHP main principle of global function creation in having one prefix for same group of functions
It makes it easier to search them
array_mapClass methods:
array_filter
1. call to action notation - first word is action in lower case then camel case
collection->findFirst(...)
obj->getName()
2. No action method naming
App::log()
DB::table('users')->lastMonth()->get()
I like when lower case part is either proverb or adjective
e.g
lastMonth
firstElement
xmlPath
In method camel case first lwcase word should be specification
and last one the most general one eg (object type)
Functions:
1. Javascript style
function onSaveHanlder
2. PHP/Ruby style
send_email()
CSS
1. hyphen/slug style
class="save-btn"
id="header-container-section" // logic structure: first root element then child then child-child
2. camel
name="first_name"
3. Bootstrap style (spesialization frist the most general)
class="btn btn-sm btn-default" // logic structure: type then size the color
name="first_name"
3. Bootstrap style (spesialization frist the most general)
class="btn btn-sm btn-default" // logic structure: type then size the color
Some people use camel case for css I dond like it
Summary:
In general I like ruby naming convention and ruby approach for naming:
-readability
-clarity
-conciseness (short better then long without lose of clarity)
Not sure about snake case methods: I would use it only for properties instead of getter setter
Private fields should be prefixed with underscore :
eg: private $_items;
Subscribe to:
Posts (Atom)