cdsanchez
|
11 years ago
|
on: Transducers.js Round 2 with Benchmarks
cdsanchez
|
14 years ago
|
on: Javascript Best Practices
That only applies to parseInt because it tries to guess the radix if one isn't supplied. parseFloat assumes base 10 and doesn't accept a radix argument.
cdsanchez
|
14 years ago
|
on: Javascript Best Practices
I don't agree that using the unary plus operator is a best practice for string->number conversions. Best practices should advocate maintainability and clarity - in this case parseFloat is the better choice for obvious reasons. Just be aware that parseFloat and unary + aren't exactly equivalent: parseFloat("10x") === 10, +"10x" === NaN.
And no, JavaScript is not a "non-typed language." AFAIK JavaScript is both dynamically and weakly typed. Being in the latter category does mean that it will implicitly convert values to other types in certain scenarios.
cdsanchez
|
14 years ago
|
on: $149 for a Touchpad if you sign up as a developer
I imagine they require the developer account type for the device program, right? That's what the vocabulary on the page seems to imply -- I'm going to try to get the coupon with with a basic account first, but I expect they'll just tell me to upgrade to the developer account type.
cdsanchez
|
14 years ago
|
on: Show HN: validate.js - lightweight JavaScript form validation library
Have you thought about adding support for boolean operators in the rule declarations? For example, "empty||valid_email" => "empty or a valid email", or "valid_email&&matches[email]" => "valid email and matches the 'email' field"? Basically, support for !, && (easy since this is the default behavior), and ||. To be honest, the use cases for this functionality is pretty limited but I think it'd be a nice feature to add just for the sake of practice. It would make handling error messages a little more complex though.
I tried to add something like this to a small validation library I wrote about a year ago. I think that part worked pretty well but otherwise it wasn't very well designed. Another problem I ran into was the lack of support for rules that depended on asynchronous operations.
cdsanchez
|
14 years ago
|
on: My weekend project: accounting.js, tiny JS library for money/currency formatting
I think it'd also be useful if you included an enumeration of the common currency symbols. For example, accounting.DOLLAR, accounting.EURO, etc.
cdsanchez
|
14 years ago
|
on: Understanding "Prototypes" in JavaScript
His example has an error. He forgot to return newObject at the end of the fromPrototype function. The fromPrototype function returns an instance (an object) that inherits from the given prototype and with the same properties you passed in with the object.
cdsanchez
|
14 years ago
|
on: Why are programmers afraid of not using semicolons in JavaScript?
`return` may be a valid statement but an object literal is not.
A standalone object literal would likely be interpreted as a block and would throw a syntax error unless it were a simple identifier and a statement `{ foo: <statement> }`, in which case it would not interpret it as an object but exactly what it is, a label and a statement.
This is why JSON parsers which use eval must first wrap the object literal with parens, to make it an expression rather than a statement.
cdsanchez
|
14 years ago
|
on: Taazr: Optimize and Monitor your Javascript
It seems a little pricey to me. 10,000 page views (for $30) isn't all that much. It's not convenient enough (for me) to justify $99 per month for the next tier of 100K page views.
cdsanchez
|
14 years ago
|
on: Samsung’s Galaxy S II invades the US in August
cdsanchez
|
14 years ago
|
on: Design patterns explained in Javascript
Lately, instead of using the module pattern by invoking a function immediately and returning an object, I've taken to just using an anonymous function/constructor with the new operator -- properties defined under "this" will be public and any other variables will be private (obviously). I prefer it over the typical "module pattern" because I believe it looks just a tad bit cleaner compared to the explicit object definition.
cdsanchez
|
15 years ago
|
on: Milk: Kevin Rose's New Company Aims to Solve Big Problems on the Mobile Web
Not really directed to you (unless you have the answer):
Is there any way for regular people (i.e not large corporations or Kevin Rose) to request a screen name from twitter, assuming that they have a registered business with the same name? I realize twitter isn't mandated to do so, but it would be nice if small startups or individuals could request screen names if the screen name is inactive.
cdsanchez
|
15 years ago
|
on: Ask HN: Which JS mobile frameworks do you use?
Although I've been tempted to use jQuery Mobile or Sencha Touch for a mobile application I've begun working on, I've decided to just start it from scratch. The main thing that's kept me away from these frameworks is speed. For example, many of the UI elements in jQMobile just don't seem very responsive (testing using my old HTC G1) - you select them and then there's a noticeable delay before any action. I don't if it's just me, but I find that irritating. The page transitions in jQMobile are also slow and choppy. Sencha Touch seems to be a little better in this regard, but it's still too bloated for my purposes.
I think these frameworks will get better with time (especially jQ Mobile),but for now and in my case they're just not worth the bloat in spite of all (or because of?) the great features they have. On a side note, not all frameworks are out of the picture. I am still considering using Backbone.js or Sammy.js to sort out all of the application logic.
cdsanchez
|
15 years ago
|
on: I'm young... Maybe a little too young
I'll echo some of the sentiments already put forth: do you actually
need funding at this stage? How much do you think you will need? Have you and your co-founder thought about asking your respective parents for seed money?
I think the answer to the question at hand is really quite obvious. Yes, since you are relatively young, they will take your age into consideration. They will also take into consideration your experience, your maturity, and similarly, your ability to handle responsibilities. I'll play the skeptic and conjecture that you probably don't excel enough in all three of these traits to make up for the risk presented by your age.
If that's the case, then at this point in your start up and with all things considered, I would say the best route would be to attain seed money from family, friends, etc. and once your start up starts getting buzz or generating nice revenue, you would be in a better position to start looking for funding from larger institutions or venture capitalists.
cdsanchez
|
15 years ago
|
on: 2011 Beercamp (Great HTML5 Site)
I'm sorry, but that's probably the least enjoyable experience that I've had on a website in recent times. It uses tons of fonts, few of which are actually readable. It doesn't degrade gracefully when JavaScript is disabled. It doesn't perform so great under Firefox 3.6. Overall, it's just unintuitive and confusing. It's an interesting concept but I'm not so sure the end justifies the means.
cdsanchez
|
15 years ago
|
on: No Contract: $149 Android phone, $25 unlimited data and 300 min
How's their service in the US (specifically CA)? My contract with T-Mobile is up in April and I'm paying $70 for 300minutes + 5 unlimited contacts + unlimited web and 400 incl. text messages.
cdsanchez
|
15 years ago
|
on: The-M-Project: A HTML5 enabled JavaScript framework to target mobile devices
Interesting - I'm about to start working on a mobile site and I noticed there weren't many mobile frameworks that also used the MVC pattern. However, at first glance, I don't like that it requires node.js since I'm mostly on Windows.
This is just me nitpicking here: why did they feel the need to define two global variables (YES/NO) as aliases for true and false, respectively?
cdsanchez
|
15 years ago
|
on: Texas sends Amazon a $269M uncollected sales tax bill
Not always. Students get 1 year free.
cdsanchez
|
15 years ago
|
on: Ask HN: Does anyone do SEO out there?
Maybe I'm just blind but I can't seem to find it in your profile. I'll add my AIM screenname to my profile just in case you would rather IM me your email address.
I have class for few hours in a bit but I'll try to give you a proposal either today or tomorrow.
EDIT: Found your gmail address by following one of the sites listed in your profile. Thanks -- I'll email you later.
cdsanchez
|
15 years ago
|
on: Ask HN: Does anyone do SEO out there?
I did SEO consulting for about a year and a half up until a few months ago. My employer was pretty happy with the results -- though I haven't kept up with the field recently as I've been trying to focus more on software & web development (being a Computer Science major). If you're interested let me know what your goals are and I'll write up a proposal. I could use the job but if I see that you wouldn't benefit much from my services I will reject your proposal. In the past I've told potential clients that they would be better off going to SEOMoz (or whatever site is popular these days) to read some articles and do it themselves.
As far as promises (or guarantees rather) and SEO goes, I don't make them. A search engine is basically a "black box" as far as I see - making a guarantee would seem a bit disingenuous. The only promise I can make is that I would do my best using whatever knowledge I have.