49 karma · joined Jun 20, 2010 (16y ago) · 41 submissions
email: amit.kaz@gmail.com
comment 3y ago · link · parent
One thing that looks a bit off is that part of the physics engine runs in reverse -
When a piece touch the high part of a pile, the sand is going UP from the bottom of the valley to the top, instead of from the top DOWN to the bottom
When the process finishes the end result is the same, it's just a bit strange :)
Example in https://youtu.be/Hp4nV4EjLgM?t=133
comment 7y ago · link · parent
2. If the tests must be updated whenever the underlying implementation changes it might be testing too much- it's better to test behaviour, not implementation.
13.
Show HN: Lateral thinking riddles site(riddledribble.com ↗)
1 points · by amikazmi · 13y ago · 1 comment
comment 13y ago · link · parent
I'm using Rails, and https://github.com/gazay/gon gem does it for you nicely.
comment 13y ago · link · parent
Coming from a Java background, I used to bang my head on the desk everything I had to write a boilerplate code for anonymous functions/classes.. luckily, there was Intellij IDE to ease the pain.
comment 13y ago · link · parent
There is a lot of bad code out there, but you shouldn't judge Ruby by a random code snippet- Ruby is just the tool, and the developer is responsible to write clean code.
I don't know what the code is trying to do with all the nested mapping.. it seems like the first 2 lines break encapsulation of the Repo model, trying to gather all the commits. This is unrelated to Ruby, it's a "bad" OO design (might be wrong, I didn't read the rest of the code)
So lets ignore that, and just rewrite from line 3 and below:
def fresh_commits(repo, n = 10)
commits = repo.heads.map do |h|
repo.commits(h.name, n).map { |c| Commit.new(c, h) }
end
commits.flatten.uniq_by(&:id).sort_by(&:committed_date).first(n)
end
Do you agree that the last line is clean & readable, even if you don't know "exactly" what "&:function_name" does?comment 13y ago · link · parent
Can you guys add a "rough roadmap overview" page to the docs, so we could have a general idea what is the status?
I like the way the RubyMine does it:
http://confluence.jetbrains.net/display/RUBYDEV/Development+...
comment 13y ago · link · parent
So if a developer comes to me with an idea, I can evaluate the partnership better- it is less risky then to go with a partner with complementary skills (not saying it's better to do it, it's just easier to figure out what you are getting into)
comment 13y ago · link · parent
In the website it stated as 1.3.2 (which imply production ready) but I think I saw some comments a month ago from you that it's not fit for production use yet.
What about secondary indexes?
Are the machines in the screencast are very weak? a simple query (get 2 rows of the dota table) running ~100ms is really slow- is it because you're using the web interface?
RethinkDB seems cool and I really want to try it in my next pet project :)
comment 13y ago · link · parent
If you are more productive, you can try to get more- but take into consideration:
1. You should have hard evidences that you are more productive- developers tend to think that they are better/have more experience then others at their level.
2. You should know your market value outside of the company and act according to that, not just your co-workers salary.
comment 13y ago · link · parent
But for young applications, it is important to get in touch with the users, and try to engage them-
There are some start-ups dedicated only to automatically send users email after some conditions, and most of the service I use do it manually too (like sending you "we noticed that after you built your form you didn't publish it for a month, care to tell us why?")
If you don't know who your users are, how can you get the negative feedback?
Getting feedback only from the people who sign up is going to be skewed to the positive side, and you'll have a problem realying on analythics for guest users (because some "guest users" are can be the same user- from different machine, or after cookie clean)
26.
Ask HN: Require a sign-up or allow anonymous/guest users?
10 points · by amikazmi · 13y ago · 11 comments
comment 13y ago · link · parent
It raises an exception in case you try to update stale data.
http://api.rubyonrails.org/classes/ActiveRecord/Locking/Opti...
comment 13y ago · link · parent
If I opened a restaurant, even if on a new set of dishes, no one will call it a start-up, and it can be a huge business.
PG: "A startup is a company designed to grow fast. Being newly founded does not in itself make a company a startup. Nor is it necessary for a startup to work on technology, or take venture funding, or have some sort of "exit." The only essential thing is growth. Everything else we associate with startups follows from growth."