News for hackers. Stuff that matters.

venuzr

Re:Web2Web Bootstrap on Thursday September 15, 2016 @01:54AM (#12503770)
Is there a way to extend a running javascript app without restart. Say I have a Single Page APP (built on React if that matters) and I want to allow third party developers to add Components / modules/ themes/ plugins to a registry. I want to be able to allow end users to choose third party plugins from the registry to extend the capabilities of the SPA.

Is this possible? If so, is there any guidance on how to achieve this?

Thanks

I notice that you have a bunch of showcase websites on your site. Do you have any examples/data to show how you either save time and money for the client company / reduce friction?
Re:Create React Apps with No Configuration on Friday July 22, 2016 @01:22PM (#12145023)
As someone new to React, I wonder

a) How is this different from getting a custom starter kit/generator from Yeoman. Searching in yeoman, I see several for "React" with the top one having over 9.5k stars http://yeoman.io/generators/

b) Is Facebook planning to maintain and keep this generator current? Why don't they just contribute/recommend an existing generator

Re:I Was Wrong About TypeScript on Sunday June 05, 2016 @06:29PM (#11843480)
Are there any patterns / recommended practices for unit testing Typescript. I recently joined a project which uses Angular1 + Typescript and had to introduce unit testing to the code base and it has been painful. A lot of backend API calls (wrapped in services) are being (chained and) invoked in the constructor. Any initialization is being squashed into the constructor. This makes setup of karma tests extremely painful/brittle without a complete refactor for each component. However wrapping initialization code in public methods feel strange to me. Any suggestions?
Re:Overfitting, Regularization, and Hyperparameter Optimization on Tuesday December 01, 2015 @02:39AM (#10654085)
Basic question(s) as I am not a data scientist but have just taken a machine learning course (https://www.coursera.org/learn/machine-learning/ )

Won't trying different combinations of hyper parameters/lambda (over a small range) help us arrive better instead of manually tuning it? Or is that what the author meant by manual tuning?

Re:Gaming the H-1B system for good on Friday November 20, 2015 @02:27AM (#10600099)
Doesn't have to work that way. I am Indian myself but my wife is from a different country (which does not wait times). So the green card was mutually beneficial. Was employment based through my work but was able to use her country of origin.

Just food for thought though not suggesting any course of action. We married for love and found out about about this little pleasant twist later.

Re:Gaming the H-1B system for good on Friday November 20, 2015 @02:19AM (#10600079)
Time off is not the only consideration. In a good economy, companies might be queueing up to transfer your H1 visa. In a bad economy (post 2001/2008 recession), if you are looking for a new job, the pickings would be very slim indeed.
Re:Homeschooled with MIT courses at 5, accepted to MIT at 15 on Wednesday November 18, 2015 @10:57AM (#10588382)
I find his drive and his parent's support commendable. Being someone who has not been homeschooled and does not know anyone who has, I am extremely curious about it.

-How does one go about replicating this kind of success? Or even moderate success. In typical schools, you have some measure of whether your child is "succeeding". How does one go about doing the same for home-schooled children.

-How do you go about providing the structure that schools provides towards increasingly complex material which will keep the child engaged and learning at the same time.

Not having children myself but watching my brother's children, I can see that the structure provided for children is extremely important, even for simple things like when to have food, go to bed, practice music etc.

Are there any good resources for raising home schooled children and providing structure?

Are bay area companies trying to tire candidates into submission?

Are companies trying to tire & hire engineers by forcing them to invest too much time on the recruiting process? Or is it something in the candidate's profile which could be giving them second thoughts.I recently started a job hunt and there have been 3 companies which I talked to so far.a) Early stage startup: Interview process: I counted at least 1 homework and presentation, along with 3...

( Read More... | 11 comments | 6 points | on HN )
Yes. The parent's visa can be transferred, for up to a max of 6 years in length. However, the employer needs to be willing to transfer the visa. Lots of employers are willing to transfer the H1B during a good economy but rare to find an employer who would be willing to do so in a bad economy.

Also, if H1B worker wants long term stability and wants to stay in the US beyond the 6 yr period, then the employer needs to apply for Permanent Residency (Green Card). The H1B worker needs to employed for that employer for the entire duration of that GC process. The icing on the cake is that the H1B worker needs to find new employment within a month of being terminated or leave the US. Again, possible in a good economy but near impossible in a bad one.

All in all, this creates the perfect hostage scenario with H1B workers pursuing stability till they get their green card.

Any tips on how to integrate this with FE frameworks like Angular? Unit/e2e testing?

Thanks for making this.

Re:AngularStrap v2.0 on Tuesday April 08, 2014 @09:28AM (#7553223)
"have heard"? This sounds like FUD to me. For the record, I am using Angular UI bootstrap but am thinking of switching mainly because a) It doesn't look like it is being actively maintained b) The animation used in AngularStrap demos make it look quite slick c) The port looks straightforward
Re:On Go’s Web Application Ecosystem on Wednesday November 20, 2013 @12:47PM (#6769578)
From my experience, defintely yes. I use the Revel framework for creating my APIs to be consumed client side (Angular).

When I make changes, refreshing the browser results in a re-compile which takes less than a second (assuming I have modified several files) on my 2012 Macbook pro.

With Go, unit testing is also blazing fast. My entire test suite (around 30+ tests) takes around 0.2 seconds.

Just for comparision, I used Play 2 (Scala) for a short while before that. Re-compilation would take in the region of 10 seconds. Startup costs are high in the Java/.NET world :(

Re:Four years of Go on Monday November 11, 2013 @08:12AM (#6711391)
Nope. This mostly becomes a problem if you like to be DRY and try to replace generics (type T) kind of functionality with interfaces. For e.g., I have a method, which does the classic, lookup from cache first before hitting the actual db. In C#, you can use

  public T Get<T>(int id, string cacheKey) {

  }
When I consume it and say Get for User object, I expect an User object as I already know it's type.

In Go, you have to return an interface (and ideally an error)

Here would be the equivalent,

  v, err := s.Get(id int, cacheKey string)
  if err != nil {
           //Handle error here
  }
  if v == nil || v.(*models.User) == nil {
		return nil, http.StatusNotFound
  }
Its a bit more code, but on the flip side, it gets you thinking as a client of all the things that can go wrong with your code
Re:Four years of Go on Sunday November 10, 2013 @10:02PM (#6709690)
That was my initial struggle as well coming into Go (I have worked for several years in C# & Java). You learn to work around this limitation using interfaces for both function parameters and return types. Frankly, I have had to do a little more explicit typecasting that I would have liked (going from interfaces to the actual type) but it is ok.
Re:Go 1.1 is released on Tuesday May 14, 2013 @12:28AM (#5703013)
What is the recommended way to go about debugging a Go program? Is there something better than GDB if I want to look at the call stack, have breakpoints, look at the state of variables etc.

Using GDB seems akin to working with assembly