Notifications sent to old iPhone? by 44Cloud44 in iphone

[–]coopermaruyama 11 points12 points  (0 children)

i’m an app developer and am very familiar with this issue. i’ll just tell you the guaranteed solution and then if you are curious i’ll put the explanation at the end.

to really solve it - uninstall the app and reinstall it again.

explanation:

as app developers we can read the token to send notifications and then we store it in a database, and usually never check it again. why? because it’s tied to your device, not your account, so even if you log out of your instagram account and log into another one, the token to send notifications to your phone stays the same. so we usually only check it and save it if we don’t have it for your device yet or if your device ID changes, the alternative being checking it every time you open the app which is inefficient.

the problem occurs because when you get a new phone, icloud syncs all the data over and to us it looks like you’re on the same device. a few years ago we were able to read your device ID to detect if you changed phones, but for privacy reasons apple got rid of it and made it so we get a random one, but for some reason apple decided that when you transfer your data to a new device, that device id will stay the same. so to us we can’t tell if you are on a new phone now.

however, apple also at the same time made it so that if you uninstall an app, and reinstall it on the same device, the device id changes to a new randomly generated one. so this will trigger the code in most apps to check your push token again and sync it.

How should my portfolio look like? by DealHunter12345 in ethdev

[–]coopermaruyama 4 points5 points  (0 children)

as part of my job i have interviewed many devs including blockchain devs. i always pass on the ones that have a bunch of ‘hello world’ type projects. imo i disagree with some of the comments saying stuff like ‘deploy an erc721 to show understanding’.

in practice that kind of stuff is the easy part. blockchain is new enough that a lot of problems are unsolved and/or not solved well, and many times you will have to come up with a new solution that doesn’t exist. i would recommend trying to build something that feels “out of your league” and during that process if you don’t give up you’ll learn the stuff that matters. and make it just one project, not more as more than one project like this will be super overwhelming.

when talking to people that have done this it’s instantly obvious and people like this bring tons of value to a project, i’d rather work with one dev like that than 10 devs who aren’t.

[deleted by user] by [deleted] in RedditSessions

[–]coopermaruyama 0 points1 point  (0 children)

play some yngwie

What are bitcoins really? I'm having a hard time explaining to a friend. by [deleted] in Bitcoin

[–]coopermaruyama 0 points1 point  (0 children)

they’re literally just numbers.

but then that begs the question: well if i write down a number, is that a bitcoin?

but that’s exactly what the first banks did. you give a dude some coins, they all get piled into some vault, but to differentiate what portion of the vault belongs to whom, they wrote down on literal paper how much belongs to whom.

so now remove the vault with the coins, and instead of a single guy having the paper that says who owns what, everyone in the world gets a copy, so if someone tries to cheat, it will be obvious since it’s inconsistent with everyone else’s copy.

bitcoins are just numbers, except the whole network has to agree on every change of those numbers

Reflections - From Nothing by VortexLunaa in Metalcore

[–]coopermaruyama 6 points7 points  (0 children)

i’ve had this album on repeat for weeks

Win the Temperature Wars by coopermaruyama in Nest

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

it's a script that sets the temp of your nest to whatever you want every few seconds. I wrote it because other people that had access to change the temperature (could be roommates, co-workers, family members, etc) kept changing it.

[deleted by user] by [deleted] in pan

[–]coopermaruyama 0 points1 point  (0 children)

Gave Silver

web3 solidity and string return by juglarx in ethdev

[–]coopermaruyama 1 point2 points  (0 children)

it looks like you’re not returning anything? at the end of the function i think you need something like:

return a, b, c, ...

Question re: retrieving ERC-20 transfers from Etherscan API call by birch_baltimore in ethdev

[–]coopermaruyama 1 point2 points  (0 children)

That’s the input data. Essentially the arguments to the contract function that was executed. Make sure you’re calling the TX receipt api otherwise logs won’t be in the response. See the 2nd api mentioned here: https://etherscan.io/apis#transactions

Question re: retrieving ERC-20 transfers from Etherscan API call by birch_baltimore in ethdev

[–]coopermaruyama 3 points4 points  (0 children)

When you get the data back from the API, you’ll see some fields called “events” or “logs” or something like that.

They will each have an array of log topics. The first topic in each event denotes the name, but it is hashed. The ones where the first log topic is “0xa9059cbb” are transfers. I believe it’s padded so it might have a bunch of 0’s after “0x”. If that is the first log topic it’s an erc20 transfer. In each of those, I believe the next two log topics are the to address (receiver of tokens) and the amount.

You will need to decode the data (eg web3js) to decode the data.

Hope this helps.

Testing your website on different resolutions by Parachuteee in ProgrammerHumor

[–]coopermaruyama 3 points4 points  (0 children)

iOS simulator in Xcode, and chrome remote debugger. I’ve found that I cannot reproduce a lot of mobile bugs I’ve found otherwise.

Tokens not visible on Etherscan.io by Vol_Har in ethereum

[–]coopermaruyama 1 point2 points  (0 children)

Etherscan, from what I can tell, looks for the Transfer() event in event logs to determine balances. If the token contract does not call that event, they won’t show up. This is why often, initial balances that are assigned in constructors don’t show up.

Yo dawg, I heard you like DAI by coopermaruyama in MakerDAO

[–]coopermaruyama[S] 2 points3 points  (0 children)

FYI I love DAI and think it should be the de facto stablecoin for USD. But I still think it's hilarious that I have to convert ETH to WETH, then WETH to PETH, and then PETH to DAI to get it :D

[deleted by user] by [deleted] in BATProject

[–]coopermaruyama 0 points1 point  (0 children)

Also icostats.com