PC Restore: Windows OS crashes and restore failures

Recently, our PC with Window 10 had been in a bad state with lot of issues. It would crash frequently, won’t boot, show random errors. Gotten to a place where even login screen won’t load. Only option left was system restore and that too failed with following errors at various different tries.

Tried many things that I found online without much success. Tried restore from a bootable flash drive, new hard disk, even with new OS (Ubuntu). Nothing worked.

After days of trying things, finally a breakthrough.

Turns out, it was all because of the bad memory (RAM). One of the memory sticks was bad and removing that immediately restored everything back to normal.

Tips for US residents traveling to Europe or elsewhere

Learned a few things when I was traveling oversees, thought it might be useful for others.

Local Currency

If you have an american debit card then below tips would really help save money for getting local currency. Note that you get best conversion rate with ATM withdrawal and save you bunch (even if you pay for ATM fee). Don’t get the local currency from those airport currency exchanges, they are rip off.

ATMs

  • Notify your bank in USA ahead of time about where you intend to use your ATM card. They will remove restrictions on your card.
  • If your PIN is more than 4 digits then it’s best to change it to 4 digits. Some ATMs may require you to enter 4 digit PINs.
  • Ask your bank for list of banks without ATM fee in the country you are planning to visit.

Credit Cards

  • Get a travel credit card. Most of the major banks offer good travel rewards cards. They give you best conversion rate along with convenience and no foreign transaction fee(like $1.50 per transaction).
  • Get a credit card from a bank that has presence in the country you are going to visit. It might come in handy in case you lose your card and need help locally for getting cash etc.

Smartphones, international calls and Data

  • Smartphone: Generally, US carriers are super expensive to use abroad. Although signing up for their international plan may save you money, most effective and cheaper way is to use local SIM. Many carriers in Europe or elsewhere in the world offer local SIM without credit card or local address, they might just ask you for ID like Passport. You can just load some credit and start using. A $20 worth of credit goes long way including a sizable data plan.
  • International calls: If you get data plan on your SIM card, it’s much cheaper to use Skype or Viber to make international calls compared to purchasing international minutes on your SIM card.
  • Data: Data on local cellphone carriers is much cheaper with prepaid plans. This comes in very handy for smartphone users. Highly recommend.
  • Wi-fi: Obviously take advantage of Wi-Fi as much as possible. For example, you can use it for international calling using Skype.

Safety of belongings

Many big cities in the world(For example, Rome) are notorious for pickpocketing etc. It’s best to plan for the scenario where you lose your Wallet, Passport, Credit cards, Cash and bags. Some tips:

  • Buy pickpocket safe purses/bags.
  • Save scans of important documents like Passport and Visas, Credit cards and so on.
  • Save addresses and phone numbers of local consulates or other govt officials.
  • Read local travel safety guidelines and US travel advisory for those places ahead of time.

Food

Best way to get good food for less is to ask locals and stay off the main streets. Generally, hotel employees are good source of information for finding out about good places to eat. Best to avoid street food in places that looks too crowded and/or unhygienic.  

Hope above tips are useful to you. Enjoy your trip!

The size and scale of eBay: 2013 edition

Hugh E. Williams

It’s time for an update of the eBay Marketplaces interesting statistics that I shared last year. eBay Marketplaces means we’re the team that builds ebay.comebay.co.ukebay.deebay.com.au, and most of the other worldwide marketplaces under the eBay brand.

Here are some refreshed and new facts:

  • We have over 50 petabytes of data stored in our Hadoop and Teradata clusters
  • We have over 400 million items for sale
  • We process more than 250 million user queries per day
  • We serve over 100,000 pages per second
  • Our users spend over 180 years in total every day looking at items
  • We have over 112 million active users
  • We sold over US$75 billion in merchandize in 2012

eBay’s an exciting place to be — plenty of engineering, business, and commerce challenges that are driven by users, items, traffic, and sales. See you next week.

View original post

The Case Against Logic-less Templates

Recently I attended a conference and two separate topics related to Templates sparked a debate off-stage about Logic vs No-logic View Templates. Folks were very passionate about the side they represented. It was great to have those discussions since I learned lot more from those debates than the sessions that were presented. I really hope there are more debates than sessions in future conferences since we actually learn more by hearing multiple viewpoints.

While everyone involved in the discussion had different opinions on what the ideal templating solution should look like, we all agreed that templates should…

  • not include business logic
  • not include lot of logic
  • be easy to read
  • be easy to maintain

The rules, best practices, performance etc aside, this is what I prefer. My preferences came out of my experience dealing with templates for medium to complex applications.

Before I go into the details, I would like to make one thing very clear. While I am trying to make a case against Logic-less Templates, that does not mean that I am advocating the other extreme ie., a templating language that allows a lot of logic. I find a templating language that allows a lot of logic, especially those that allow the host programming languages to be used inside the template, to be hard to read, hard to maintain and simply a bad choice. A JSP template with Java code in it and an Underscore template with JavaScript both fall into the category of being a full-of-logic template. JSP and Underscore are not necessarily at fault here, but rather the developers who choose to abuse the additional freedom.

What I am for is “less-logic” templates in place of “logic-less” templates (thanks Veena Basavaraj(@vybs) for the term “less-logic templates”!).

A good templating language should offer, at a minimum, the following things:

  1. Clean and easy-to-read syntax (including freedom to use whitespace that will not show up in output)
  2. Structural logic like Conditionals, Iterations/Loops, Recursions etc.,
  3. Text/Token replacement
  4. Includes

A great templating language should ALSO offer the following features:

  1. Ability to be rendered on the server and the client
  2. Easy to learn with as few new concepts as possible
  3. Simple template inheritance
  4. Easily debuggable
  5. Great error reporting (line numbers, friendly messages, etc.)
  6. Extensible and customizable
  7. Localization support
  8. Resource URL management for images, scripts and CSS

I feel that a logic-less template is too rigid and hard to work with due to the imposed restrictions. Here is why I am not a big fan of logic-less templates:

  • If I am writing a logic-less template then I need to make my view model bloated with a ton of getters for the raw data. Therefore, a logic-less template is usually accompanied by a messy and difficult to maintain view model.
  • Every time I need to add a new variation to my view I need to then update both the view model and the template (even for simple variations)
  • Too much “massaging” of the data is required to get it ready for the template
  • A lot of helper methods must be added to offset the rules of a logic-less template

Regarding the argument of better performance with logic-less templates– while  logic-less templates might have a simpler implementation, you will still have to pay a price for the additional preprocessing/massaging of the data that is required before the data gets to template renderer. While a templating language that allows more logic might have a more complex implementation, if the compiler is done correctly then it can still produce very efficient compiled code. For those reasons, I would argue that a solution involving templates with more logic will often perform a lot better than a similar solution based on logic-less templates.

Conclusion

There is no doubt that there are advantages like simplicity, readability and possibly some performance gains associated with  logic-less templates like Mustache, but I do not think the tradeoffs are fully justified in practice.

Logic in templates isn’t really a bad thing as long as it doesn’t come in the way of readability and maintainability of the templates.

Love to hear your thoughts!

Credits: Many thanks to my colleague Patrick Steele-Idem(@psteeleidem) for helping me write this blog. He is working on some cool stuff like RaptorJS and a new templating language; be sure to check them out when they are open-sourced in the very near future.