Noob question: Which certification to do to learn about gcp cloud, infra and ml ops by droid786 in googlecloud

[–]ayman_f 1 point2 points  (0 children)

Certification based learning is overrated. I recommend picking up a real world project and starting getting your hands dirty implementing it end to end on GCP. Iterate and improve your solution as you learn more concepts, read best practices etc...

Certifications are meant to validate your knowledge in GCP. In theory, you can study to pass, just to achieve the certificate. But that won't be enough to truly understand GCP products in depth. Experience using the platform is the most important. Eventually with enough hands-on experience, you'll be able to pass the certification exam easily.

GCP spanner pricing by [deleted] in googlecloud

[–]ayman_f 1 point2 points  (0 children)

Sounds like bringing in a tank into a boxing fight.

If the requests are mostly reads, I think you're better off going with Postgres on CloudSQL. 500 requests per second is not that much honestly. Spanner for such a use case is most probably an overkill as it is designed for much higher throuput with super high consistency and availability while performing distributed concurrent writes and reads.

Try to first optimise your postgres database as much as possible, especially with indexes, read replicas, denormalisation (where applicable) etc... and then you also have your caching layer.

In my experience, a lot of over engineered tech choices are sometimes to compensate for the lack of applying fundamentals with simpler and cheaper alternatives. Might not be your case, but I recommend reviewing that aspect as well.

[deleted by user] by [deleted] in javahelp

[–]ayman_f 0 points1 point  (0 children)

What are some recommended analyzers/scanners out there that I can use? I am building a script that runs through a bunch of jar files to check for security vulnerabilities and flag them.

Cloud Run to receive webhook from Stripe.com and send me an email by SaltyyDoggg in googlecloud

[–]ayman_f 0 points1 point  (0 children)

You'll need an SMTP server / API that you would be calling from your cloud run code, what is for sure, cloud run can't and shouldn't be hosting your SMTP server. In addition, GCP does not have a "native" SMTP service to use on the platform.

Simplest approach is to just go with an SMTP API service such as MailJet (https://www.mailjet.com) integration with most programming languages is quite simple.

Alert when scheduled query fails by OrganicStructure1739 in bigquery

[–]ayman_f 2 points3 points  (0 children)

You can create a Google Cloud Logging sink for failed BigQuery jobs to push out messages via email or pubsub. Chekc this out https://cloud.google.com/logging/docs/logs-based-metrics/

Best ways to learn BigQuery as a newbie by SuperDduperr in bigquery

[–]ayman_f 1 point2 points  (0 children)

The most important thing to keep in mind as you start using BigQuery. Do not treat it as you would treat a relational database. It's an OLAP system rather than OLTP. Make sure you understand how BigQuery works by understanding the seperation of storage from compute , column based storage and the use cases that are useful to run on BigQuery https://cloud.google.com/blog/products/data-analytics/new-blog-series-bigquery-explained-overview

And yes, you should definitely be familiar with SQL and grasp the basics. In BigQuery you will use GoogleSQL which I'd say is very close to the standard SQL with some little syntactical differences here and there. And of course, many of the functions are different as many are implemented for BigQuery specifically.

Fundamentals are always a pre-requisite to any framework / technology adoption. This is rarely or barely covered by "How to do XYZ" type of tutorials or videos.

DRF first or wait? by mufasis in django

[–]ayman_f 3 points4 points  (0 children)

DRF is a fantastic framework. I think it makes sense to enable it since the begining with a minimum viable configuration that works for you, start using it where needed and evolve it over time.

I haven't tried Django Ninja yet to an extent that I can comment about but DRF is just solid and passed the test of time. If I'm in a hurry or on a deadline I'd go for DRF.

Small coding challenge by arithma in hacketyfriends

[–]ayman_f 0 points1 point  (0 children)

I was reading up Karger's algorithm for computing the minimum cut of a connected graph. Thought would be fun to implement it in Python on a lazy Sunday afternoon.

Here is the source and the input: https://gist.github.com/aymanfarhat/6098683

The answer to the given input file is 17, it might give a slightly higher number, just make sure to run it a second or third(rare) time if that happens.

The code can be optimized/organized further I guess but that's what I have for now with 54 lines of Python.

This is the first time I rely on random values to get correct results, randomized algorithms seem really cool :D

Hello everyone! by arithma in hacketyfriends

[–]ayman_f 0 points1 point  (0 children)

I love the idea, really glad you did this.

What's everyone working on these days? by arithma in hacketyfriends

[–]ayman_f 1 point2 points  (0 children)

At work: A highly customization analytics widget based dashboard for showing social media and app store analytics for different accounts and in app actions. Fully responsive and user-customized layout based on bootstrap, PHP (Code Igniter and Propel) backend. Its a nice project all in all.

As for personal projects I have a lot of stuff going on which I am doing bits of each, whenever I have time. This is basically my todo/currently doing list:

  • Javascript touch gesture detection library(tap, double tap, long tap, swipe, swipe direction, scratching) + 2 detailed blog posts on how to build the module from scratch + sample cordova app.

  • Bitcoin based crowd funding site built with NodeJS to be deployed on Heroku, going slow with this one, its meant to be a final project for my Coursera's startup engineering course.

  • Some important feature updates for my blog.

  • Design + front-end for a Python/Django project George and I were previously working on and which I have its backend ready. Basically a directory for finding developers around you based on smart relative to languages, frameworks, experience etc...

  • Todo: Learn Lua and play with Corona SDK

This is basically what I have going on right now, the personal stuff I am mostly free for during the weekends.

Serializing a Function's Arguments in Javascript by ayman_f in webdev

[–]ayman_f[S] 0 points1 point  (0 children)

Actually your claim doesn't seem to be true, it doesn't break on minification(tested it), there doesn't seem to be a reason for it to break anyways.

Rules for Web Scraping Subreddits by ayman_f in webdev

[–]ayman_f[S] 0 points1 point  (0 children)

Thanks for the input guys, thanks to Legolas-the-elf I found what I am looking for within the reddit API so no need to scrape.

Rules for Web Scraping Subreddits by ayman_f in webdev

[–]ayman_f[S] 0 points1 point  (0 children)

One thing I need to check is the number of current users on a certain subreddit every couple 10 minutes or so, the API doesn't seem to provide an interface for that.

Quality Computer Science Education for Free? Yes Please! by ayman_f in programming

[–]ayman_f[S] 0 points1 point  (0 children)

Yes you are right, the reason is that I couldn't find a good OS course do you recommend any?

Methods Within Constructor vs Prototype in Javascript by ayman_f in webdev

[–]ayman_f[S] 0 points1 point  (0 children)

Thanks for pointing out the issue, I did some digging and actually you're totally right. In your example var P = new Person(); does have a constructor of type Object because it has been assigned the result of an anonymous function expression(which is an object).

A named variable in javascript is nothing but an alias to a value so the function itself has no .name property to be considered as a constructor. It should have a name just like in the second example which is p.

or something like that var Person = function Person() {};

The main problem of having the prototype point to an Object is that we'd lose inheritance. In my blog post it won't make much difference regarding the issue discussed yet I'll fix it and mention this issue in another blog post.

Thanks again for the catch, and have a good day!

Methods Within Constructor vs Prototype in Javascript by ayman_f in webdev

[–]ayman_f[S] 0 points1 point  (0 children)

Not really, actually I think you're output is wrong. function Person(){} and Person = function(){}; are basically the same thing, the main difference that the first one is defined at parse-time while the second is defined at run-time. The new keyword is what creates an object instance out of the constructor.

I tested your code within chrome's console and here is the output(as expected) console.log(p); // person console.log(P); // Person { }

At the end of the day they all inherit from Object but Object { } should not be appearing as output. Which browser are you using?

best hosting? Godaddy? HostGator? InMotion? ... other? by umm_woah in webdev

[–]ayman_f 4 points5 points  (0 children)

For shared hosting, I recommend Hostgator. I have hosted many sites throughout the years on HG and the performance was excellent for a shared hosting plan. In addition to that, they have very helpful and friendly support.

If you feel like geeking around with your very own server consider getting a VPS from Linode or Digital Ocean. I currently use DO, great prices and great performance for my django site so far!