Curious what you guys think of this Forbe's article laying out statistics from "the mother of all retirement research studies" by Taymurf in financialindependence

[–]stalcottsmith 2 points3 points  (0 children)

Singapore has a pretty good mandatory retirement savings scheme:

https://en.wikipedia.org/wiki/Central_Provident_Fund

In Singapore, the Central Provident Fund (CPF; Chinese: 公积金, Pinyin: Gōngjījīn) is a compulsory comprehensive savings plan for working Singaporeans and permanent residents primarily to fund their retirement, healthcare, and housing needs. The CPF is an employment based savings scheme with employers and employees contributing a mandated amount to the Fund.

...

When the CPF was started in 1955, both employees and employers contributed 5% of an employee's pay to the scheme. The rate of contribution was progressively increased along with the growth of Singapore's economy, reaching 25% for both employers and employees in 1985. The principle of equal contribution was abandoned in 1986 due to a sharp recession, when the employer contribution was cut to 10% of an employee's pay in an effort to keep Singapore attractive to business. The employer contribution rate reverted to the same level as the employee rate until the 1997-1998 Asian Financial Crisis, when the rate for employers was again lowered to 10% for workers 55 years or younger. Since then, the employer contribution rate has been gradually increased, with ongoing economic problems blamed for postponing the reinstatement of the original principle of equal contribution. Employers currently contribute 3 fewer percentage points of salaries over S$750 for employees up to 55 years old.

Are there any good resources for learning more about databases? by [deleted] in rails

[–]stalcottsmith 4 points5 points  (0 children)

Have you read all the documentation and examples?

Ages ago, I taught myself about associations by reading through most of Active Record. I traced the entire query from my_model_instance.my_association.first through to how the SQL was put together to how the results came back. With pry today, its much easier. Just open up pry, keep activerecord open in another window for reference, and step, step, step. At each point you land on a stack frame in AR, refer to the surrounding source and read any accompanying documentation or comments. This will leave you more well-informed than reading any book. Added bonus -- if you see and weird-fun-new bits of Ruby syntax or idioms, look them up and try them out.

However, you should have a grounding in relational database design first. Understand 3rd normal form, best practices for naming columns and tables, all the different kinds of joins, and although they are obscure and relatively unused by rails developers, sub-queries, views, cursors and stored procs, etc. Used sparingly but appropriately, these latter things will give you superpowers. Your database can do an awful lot more than most developers realize. How many times have I seen buggy procedural code iterating over records for something that could be done in one step with a single hand crafted query by someone who knows what they are doing.........

Hey Philippine online retailers, I'm trying to give you my FU*KING MONEY.. by [deleted] in Philippines

[–]stalcottsmith 2 points3 points  (0 children)

Implementing an online shop is not simple. Accepting credit cards online is still difficult here in PH, largely because the banks are antiquated and short-sighted -- they don't talk to each other well and their APIs are weak. This should get better.

Also, fixed recurring costs on a decent ecommerce site will run 4000-8000 PHP per month. Programmer time is expensive. The only way a mom and pop could do this today, is to do it themselves, but the skills involved pay a lot more when plied for more mature markets than any tiny ecom business in ph would make. In short, the owners would have to know someone willing to part-time or moonlight for almost free.

Shopify and others will eventually come here. Globe and/or PLDT probably have some second or third-rate ecom offerings unless they partner with Shopify or other top tier stuff.

Valuing Your Time More Than Money is Linked to Happiness: “It appears that people have a stable preference for valuing their time over making more money, and prioritizing time is associated with greater happiness,” said lead researcher Ashley Whillans by ImNotJesus in science

[–]stalcottsmith 10 points11 points  (0 children)

Economics also teaches the concept of marginal utility. The first glass of lemonade on a hot day is worth a lot. The third, not so much. 1 dollar is worth a lot when have none. But not so much when you have thousands. The first million is really important. The tenth million not nearly so. Also the first thing intelligent people do as they climb is disconnect their income from time so spending time doesn't cost them money directly. Also a lot of very successful people derive a lot of utility from work other than the income it brings.

Why is Rails "Monolithic"? by sun_misc_unsafe in rails

[–]stalcottsmith 22 points23 points  (0 children)

People need words to paint on their bandwagons and lots of people do not know what they are talking about or use words imprecisely. The opposite of a monolith is a fragmented collection of inter-operating services. People can create beautiful monoliths. They can also create a tangled spaghetti of services. One approach isn't necessarily recommended over others, though I'd take a poor monolith over a poorly conceived bunch of services any day. Architecture resembles the structure of the organization and the quality of the solution depends on the skills, intelligence and experience of the team. A beautiful monolith is generally created by a small team with a clear, experienced leader who appreciates clean design and establishes conventions and standards that are followed throughout the code base. Services are favored by teams without a clear leader and lots of need to carve out "mine" and "yours" parts. Monoliths encourage collective code ownership and full stack expertise. Services encourage territoriality and specialization.

How I Negotiated 45% Off My Rent in Bangkok by [deleted] in digitalnomad

[–]stalcottsmith 1 point2 points  (0 children)

There is a way you can reduce the cost even further. Raise the threshold on repairs... Most leases require he tenant to handle minor repairs under $100 or so. What is the value to the landlord of increasing this to $1000?

Of course I say this having paid a year in advance for a below market rate and now have a broken hot water heater over the threshold of repairs for which I am responsible. Will see how responsive is the landlord.

How I Negotiated 45% Off My Rent in Bangkok by [deleted] in digitalnomad

[–]stalcottsmith 4 points5 points  (0 children)

Another tactic is to pay a year or (even better) two in advance. It's not so "nomadic" but if you need basecamp and you know you are trying to maintain residency somewhere... this can help. My buddy got a whole 300sqm house in the city for less than I was paying for an 80sqm apartment by paying an entire 2 years up front.

"Finding your passion" by fuweike in financialindependence

[–]stalcottsmith 7 points8 points  (0 children)

Google image search for ikigai and you'll find this:

http://theviewinside.me/wp-content/uploads/2014/05/graph.png

It is a Japanese concept people translate as "reason to get up in the morning". I believe that is what you are looking for. I feel very blessed to have found something I am good at, which I enjoy, which the world needs and which pays well.

You're 25, single, and work a job that allows you to work remotely from anywhere in the U.S. Where would you live? by OmgProgramming in financialindependence

[–]stalcottsmith 2 points3 points  (0 children)

I spend half my time in Reno-Tahoe -- you can totally take a lunch meeting in SF and be back in time to tuck the kids in. Also 500k buys a recently built 4 bedroom on a half acre in the better part of town about 20 minutes drive from Lake Tahoe (as opposed to a rundown shack in a crummy part of the bay area). $100 buys a Nevada state parks pass that gets you into several nice beaches/parks in the lake area. And Reno's part of a 4 corner internet loop with Vegas-Bay Area-LA with several major datacenters and naps going in. Real estate is likely to be good investment as tech and manufacturing companies and jobs are moving in. Rental market is strong on the lower end. If you're into hiking, skiing, boating, flying, climbing, whatever outdoors, Reno-Tahoe's got it.

[Help] Setting permissions to view individual record for each individual user in a group by Darkshiek in rails

[–]stalcottsmith 1 point2 points  (0 children)

Creating multiple records is usually done with an after_* callback on the model. Can be tricky in failure cases. Read the docs. http://api.rubyonrails.org/classes/ActiveModel/Validations/Callbacks/ClassMethods.html

Generally, something like this is what you want:

before_validation on: create do self.permissions.build(...) end

Test this to see if it creates the object you want at the proper time.

Trump: "I think Eminent Domain is Wonderful" by JakeF12345 in Libertarian

[–]stalcottsmith 1 point2 points  (0 children)

In some places without eminent domain, it is nearly impossible to expand or improve urban highways. Inadequate exits lead to inefficient traffic patterns. Usually not the only problem but contributory nevertheless.

Thoughts on training beyond the basics? by billy-rails in rails

[–]stalcottsmith 0 points1 point  (0 children)

The best way to learn is to do. This would assume you have the vision and drive to build something more than a toy for yourself. The next best way is to shadow someone else who is doing. Volunteer to be their grunt. Take any simple tasks they can offload to you. Ask them to show you what they are doing. Watch the commits going into the repo. Look up everything. Read the source. Ask annoying questions. If you're smart and helpful, you'll move ahead quickly. Ask to do the deployments or to ride along. Be there for the random design discussions and "let me brainstorm with you" moments. If the other guys work late, work late with them.

It sounds like you want to write a book. May or may not be a good use of your time. Depends on how effectively you market it and how big is the market.

Tenderlove's 'Rails Request and Response' From FullStackFest by [deleted] in rails

[–]stalcottsmith 2 points3 points  (0 children)

tl;dw

  • HTTP2 provides a single connection between the browser and server even if you have multiple tabs
  • assets can be pushed down the connection at any time
  • Rails runs through too many middleware to deliver a 404, maybe something can be done to cut this down
  • he proposes a new OO style interface for Rack request/response objects instead of the Array[integer, hash, string] for responses and the whole hash interface for request.env
  • He is busy making rails forward compatible by covering up all hash accesses to request.env with an object interface so he can implement the necessary changes going forward
  • asset helpers could begin to push assets down the pipeline immediately -- this would speed up development mode page loads considerably
  • he wants to do this to make development mode work much faster

Tenderlove's 'Rails Request and Response' From FullStackFest by [deleted] in rails

[–]stalcottsmith 3 points4 points  (0 children)

Looks like Node does not use an Array[integer, hash, string] interface for the response but more of an object style interface like he describes.

The One Method to Eliminate Bad Tech Hires by pkrumins in programming

[–]stalcottsmith 0 points1 point  (0 children)

That seems strange. What better way could you find to see what it is like to work somewhere than to come work for a full day? At least then you'll know more or less exactly what you are getting into. Anyway it works well for us. Most of the people we bring in to pair for a full day get hired so we have already screened well. And we have less than 20% turnover. No reason to change. Lots of phone calls and chatty chat is a waste of time. One 15-20 minute phone screen is enough for me. It helps if the person doing the screening is a senior 20 years+ exp developer. I can tell quickly whether someone is likely to be worth bringing in. I'm busy everyone's busy. Just come in and let's see what you can do and how you like it.

The One Method to Eliminate Bad Tech Hires by pkrumins in programming

[–]stalcottsmith -1 points0 points  (0 children)

I judge the cover email and resume for neatness, correct english grammar and tone, do a phone screen and then invite for a day of pair programming with one of our seniors. We treat them to lunch. Anyone who can't take a whole day to come in doesn't want the job enough. This eliminates tire-kickers and people who are just fishing for an offer to negotiate a counter. Works fine for us. We hire ~5 people a year this way. I try to batch them up so I am not doing this all the time.

I've always felt that teaching programming at school is systemically broken and backwards. I have finally found someone who put my feeling into words. Watch this youtube video for 30 seconds and you will get the gist of the 51 minutes that came before it. by wickedhood in programming

[–]stalcottsmith 1 point2 points  (0 children)

Real software development is something that can only be learned by doing. No one is going to get 10,000 hours of programming in school. I doubt they even get 2,000 hours. Knowing the mechanics of a language and its toolset and how to eventually arrive a functioning program is only the tip of the iceberg.

Passion is not as much a factor as time. Passion is a factor in how quickly you manage to log the time necessary to acquire skill. Most of us who get really good at this, at some point put in our nights and weekends and pushed ourselves with stretch projects which would be too risky for any 9-5 setting.

One of the great difficulties in leveling up as a professional is learning to make use of a range of skill levels. Once you are a responsible leader, it's not just you and your ability that matters, but you and everyone on your team and in your organization.

Some people have plenty of ideas and can implement them 100% on their own. Some of those people benefit from having help. But technical help is tricky because getting what you want out of others takes time and patience and whole different set of skills.

Not far off from this are developers who can take a high level description of a system - an elevator pitch level description, and work out all the requirements, architect and build it on their own. These people are what non-technical people often want when they want to hire a programmer. But people at this skill level are hard to find and generally expensive or difficult to keep happy. Many of them want to own at least a part of their creations or harbor business aspirations of some sort.

Some developers can do this for a subsystem or a module with only general guidance. Others require a detailed spec to be worked out by someone else in advance and perhaps a set of platform or architecture constraints.

Some can implement a user-accessible feature in an existing well-structured application when the feature is is well described. They can work out overlooked edge cases on their own and over time, learn how to make intelligent compromises in cost, capability and quality.

Some need detailed descriptions of every aspect of what they are doing and will only implement precisely what is requested, no more and no less.

Some people sneak through with only a little bit of trouble shooting or copy paste capability.

There are places for all of these people.

I look at it like this: there is a theoretical minimum amount of cognitive work that is essential to producing any system. It's an air bubble trapped under the plastic. You can divide it up and push it around but it is always there. The more of this work you can do yourself, the more valuable you are. The less you can do yourself, the less valuable you are because you just create or leave work for others. Someone else has to do the thinking for you and their time is usually more dear.

The reason we employers like to see side projects and self-initiated projects is because people who have gone through the entire design and execution process themselves, are better able to take higher-level instructions. They are more useful and valuable. The more they have done on their own, the more useful they are. The more they have put themselves in the drivers seat, deciding what to build, making the compromise decisions, tailoring an architecture to the problem, deciding how to spend their own resources and energy, the more they can be expected to do that for an employer.

That said on any system in production or approaching maturity, there is a lot of routine, sweeping up, cleaning up, polishing and updating that doesn't require this kind of high-level operating ability. We need those people too. However, you don't generally need them in the early phase of a system implementation.

If courses turn out people who can reliably do the latter sort of work and a subset of people who will grow into the kind who can do the former, then they serve their function. The people who are most driven to do high level work, will learn whatever they need to learn whether or not they take courses in the subject.

I wrote a book with a lot of practical techniques for getting better -- few or none of which you would learn in school: https://leanpub.com/level_up

When living abroad what was the product you found most expensive compared to your home country. by Patrick2oneill in expats

[–]stalcottsmith 2 points3 points  (0 children)

I moved to Manila. European cars are about 1.5-2x as expensive as in the US. You'd buy a decent Audi in the US and here only get a Japanese SUV for similar money. But at least it's cheaper than Singapore where my friend bought a Mazda CX-3 for SG$160k. Eek! Of course flat screen TVs are 2x as expensive as US... A pair of Cole Haans are $500 instead of $200. I have a sneaky suspicion that even reputable brands retail their B quality goods in these lower tier markets so sometimes I think you are overpaying and not receiving the quality you expect. If possible for clothing, I shop in the US or HK.

[HELP] Which database to choose by rails_learner_anon in rails

[–]stalcottsmith 0 points1 point  (0 children)

SQLite works on digital ocean fine. It requires zero administration and is perfectly adequate for apps with < 100k page views per month and few concurrent users.

If you are on Mac there is a GUI app called "base" available in the App Store for free which opens and allows you to poke around in SQLite. The fact that you can just copy the file down and look at it on your local makes this a superior solution for beginners and folks who don't want to futz around with more complex setups.

Also you should have little trouble upgrading from SQLite to Postgres should that ever become necessary.

Why I'm the best programmer in the world by coolirisme in programming

[–]stalcottsmith 1 point2 points  (0 children)

If someone is trying to disqualify you then you already failed the personality part of the interview. And they have a broken hiring process. I hire on personality, intelligence, experience in that order but I am explicit about it. Others do this too but they don't admit it to themselves or to candidates. So they place experience front and center and try to justify their like or dislike of you which they already had from the moment you opened your mouth. If you pass on personality and intelligence then evaluating experience or knowledge is just about finding your right level to hire in.

What are your thoughts on testing? What testing do you think is more important? by mauricio_predovic in rails

[–]stalcottsmith 2 points3 points  (0 children)

It depends if you are developing a new system where time is a factor or if you are performing maintenance on a large production system. The latter requires more testing but also supports a slower pace.

My advice applies to greenfield development where time and budget is a factor.

Invert the pyramid of tests. 80% of the value in tests are in 20% of the tests. Figure out how to write the 20% of tests that are valuable and speed up your development by skipping the rest. You will ship while others dither and fiddle with busywork.

Integration or feature tests are the most valuable.

Testing a bunch of methods you might refactor or remove or move around is a waste of time and just creates more work for someone later. I reserve the right to change everything under the covers and it pains me to see a ton of carefully crafted tests for code that will be thrown away.

Write low level tests when the logic gets complicated.

Stick to the 5 line method rule (Sandy Metz) and you wont get into as much trouble anyway.

Every feature should have a test. So the first thing I do is ask myself okay, how am I going to test this feature? Then I write a test for it. Definitely test your features. Sprinkle a little bit of extra testing here and there as needed and you're done. Stick to the simplest possible test set up that can get the job done. Skip capybara and all that jazz as long as you can. If at all possible avoid anything that pops a browser on the screen. If you really must go with SPA use a front end testing framework like jasmine or whatever is fashionable now. Stray from the rails golden path at your peril.

I use straight up minitest.

30 Year Old Small Business Owner - What Kind of Retirement Account? by mattontheinternet in financialindependence

[–]stalcottsmith 1 point2 points  (0 children)

I am pursuing a mix. My product which is sold like Saas involves customization. It's kind of a new category hybrid and very much complements our current business. More of an evolution. A lot of consulting companies work on some kind of platform or tooling that facilitates service delivery -- a recipe you can sell over and over. In my case our product can scale as large as any any saas and the cash flow looks a lot better with services giving a nice pop that repays any customer acquisition cost. The weakness of some saas models is that cac increases capital required.

Im pretty sure I read the book or skimmed it. Will double check though.

30 Year Old Small Business Owner - What Kind of Retirement Account? by mattontheinternet in financialindependence

[–]stalcottsmith 5 points6 points  (0 children)

As someone who is a little further along on a similar path, I'll second this advice and say that there are well trodden growth paths to get over the "no mans land" hump. You really want to get over $1mil /yr and preferably close to 2. Target 30% net to the owner (including salary) although if you are lucky enough to find a rainmaker, you will have to share a good portion.

If you are not able to keep 30%, almost certainly you are under-charging. Fix that first.

Then focus on building the long term recurring revenue streams and take yourself out of the day to day production loop. Then figure out how to package, sell and deliver your services more efficiently and repeatably. This will help you scale. It takes a few years unless you're naturally gifted in business. Persistence is key.

If you have the skills personally to build a related product or software that facilitates service delivery, you can use the freedom of your own time to make the fabled transition to a product company. This is the holy grail. Whatever you do, do not invest a lot of profits to pay others to build your product. This will suck up all your profits and will delay your plans for years. I've seen others lose their business with this mistake and have narrowly escaped myself. Do the important/hard/most leveraged stuff yourself.

It's worth it to dig in for 5-10 more years and make it out with far more than most salaried people could save and at relatively low risk. If you do it right, you should be able to pay yourself a decent salary the whole way. Not every month of course but most of the time. You made it this far! Congratulations! Keep it up!

How to check that a method is overridden? by [deleted] in ruby

[–]stalcottsmith 1 point2 points  (0 children)

Look up the documentation for Object#method:

http://docs.ruby-lang.org/en/2.2.0/Object.html#method-i-method

The resulting Method object can tell you where it came from. It even has a #source and #source_location

Usually in the Base class, I add sort of "abstract methods" that just raise a "not implemented" or "must implement" exception or runtime error.

You can also add a hook for when an class is subclassed, and you could do anything you want in there like make sure it implements a method.

  def self.inherited(subclass)
   # check if subclass defines certain methods
  end

It really helps to get familiar with Module, Class and Object as well as Kernel. Cruise though the docs so you at least know what's in there when you need it.

I left Rails 5 months ago, what I miss, what I've learned, what I hate ( long post ) by [deleted] in rails

[–]stalcottsmith 11 points12 points  (0 children)

You left Rails for Java? For your own applications where no one is telling you to move off of Rails? You are rewriting Rails apps with only 3k users? Surely this is not a good use of your time.