Learn javascript from Jquery source
Posted: Saturday, February 19, 2011 by Unknown in Labels: Coding practises/ProgrammingI hope you will really enjoy following video and will get to know new way of javascript coding from Jquery source.
Paul Irish : 10 Things I Learned from the jQuery Source from yayQuery on Vimeo.
Related articles
- Create a Custom jQuery Selector (devcurry.com)
- jQuery Conference Boston 2010 Video: Intro to jQuery UI (elijahmanor.com)
- jQuery 1.5.1 RC 1 Released (jquery.com)
- jQuery Community Updates For February 2011 (jquery.com)
- jQuery Fundamentals: a Free Online Book (blogs.sitepoint.com)
- 13 Excellent jQuery Techniques And Demonstrations (mt-soft.com.ar)
- How to Reuse Your JavaScript as jQuery Plugins (readwriteweb.com)
- jQuery in 6 minutes for short attention span people (blogs.msdn.com)
Generally we might need to modify the structure and behaviour of a program at runtime
(or )
we have to call a method of a class but we will get class name and method at runtime only. I mean during compile time we dont know what to use.
In these type of scnerios we can opt for reflection style of programming. I will show you sample program how to use in different languages.
Java:-
// No Reflection
new Foo().hello();
// After Reflection
Class cls = Class.forName("Foo");
cls.getMethod("hello", null).invoke(cls.newInstance(), null);
Javascript:-
// No Reflection
new Foo().hello()
// After Reflection
new (eval('Foo'))()['hello']()
Python:-
# No Reflection
Foo().hello()
# After Reflection
getattr(globals()['Foo'](), 'hello')()
Related articles
- Be careful with exec and eval in Python (lucumr.pocoo.org)
- Guide to Python Introspection (ibm.com)
- Moving to Python 3 (lwn.net)
I wanted to share few things how i thrive into a startup company.
1) Self motivation
2) Be Transparent
3) Very passionate
4) Be hungry every minute
5) Let my manager knows my strengths, weakness and expectations
6) If I feel disgruntled then analyzed myself immediately
7) Expect less from others
8) Start with doable things once we see any working prototype we can scale it to any extent.
9) Shout immediately if i stuck any where
10) Built Good reliability by attitude.
At least,
I did these things for the first 1.5 years. Later anyhow i get habituated with these things :)
Related articles
- When Is A Startup No Longer A Startup? (businessinsider.com)
- Startup Culture(s) Leading the Way (growvc.com)
- How to Get Your Company Into Social Media: Simple Tips for Startups (fastgush.com)
- How to get your startup on Hacker News (swombat.com)
- Tech companies funding Obama startup initiative (holykaw.alltop.com)
Javascript memory leaks
Posted: Wednesday, February 9, 2011 by Unknown in Labels: Coding practises/ProgrammingJavascript memory leaks especially in IE during removal of any DOM element (or) setting innnerHTML property. During those actions we should explicitly set "null" to their event handler's property. Have a look at "purge" function in the following link.
Source:- http://javascript.crockford.com/memory/leak.html
Related articles
- Tips on Learning JavaScript (thinkvitamin.com)
- Best Practices for Speeding Up Your Web Site (polavenki.blogspot.com)
- Google Closure: How not to write JavaScript (blogs.sitepoint.com)
jwebsocket - Java/Javascript bidirectional communication
Posted: Wednesday, January 26, 2011 by Unknown in Labels: Coding practises/ProgrammingIn my last post i wrote about HTML5 websocket. As i dig into it i found jwebsocket.
Here is my observation:-
Pros:-
1) jWebSocket is a pure Java/JavaScript high speed bidirectional communication solution for the Web - secure, reliable and fast.
2) Make use of websockets if the browser does not support this then it will fallback to flashbridge.
3) Standalone jwebsocket server is provided. You can even add jwebsocket capabilities to existing web servers like jetty,tomcat..etc.
4) Client side plug-in is available so that you can think about only on application logic.
5) Can be used in different ways like Chat, Steaming, RPC, Shared object, Shared canvas. Lot of demos are there in the site.
Cons:-
1) What if flash crashed because of some other application in the browser.
2) Could have provided long polling too as another fallback option.
3) Need to support SSL for all browsers.
4) Could have provided some tool to perform load/stress tests. Since it is not http communication we can not perform load tests using Jmeter..etc.
Finally it is pretty awesome and very good. I am exploring it. If anyone of you using it please let me know about its performance.
HTML5 WebSocket an alternative to long polling
Posted: Monday, January 24, 2011 by Unknown in Labels: Coding practises/ProgrammingRelated articles
- Five Signs You Need HTML5 WebSockets (web2.sys-con.com)
- WCF WebSockets (davidpadbury.com)
- New HTML5 and web standards support in iOS 4.2 (tuaw.com)
- WebSocket disabled in Firefox 4 (hacks.mozilla.org)
- WebSockets Disabled by default for Firefox 4 (cometdaily.com)
