Skip to content

Instantly share code, notes, and snippets.

Avatar
👀
Reviewing bad code

Alex K zexa

👀
Reviewing bad code
  • Some Fintech Company
  • zexa@rizon
View GitHub Profile
@zexa
zexa / shipping_date_estimation.php
Last active Jul 19, 2020
shipping_date_estimation
View shipping_date_estimation.php
<?php
declare(strict_types=1);
class ShippingMethod {
/**
* @var int
*/
private $mondayThursday;
/**
@zexa
zexa / f_biggestPrimeFactor.py
Last active Aug 17, 2017
How would you improve this "Biggest prime factor" function?
View f_biggestPrimeFactor.py
#!/usr/bin/env python3
#limit=600851475143
limit=13195 # works fine as long as u dont have to deal with huge numbers
#limit=15
def fb_isPrime(num):
checkTill = 1
if num<=1:
return False;
for i in range(num-1,checkTill,-1):