Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "mapper"
-
Why not have a custom (500 line) JSON mapper... you know... fuck those auto mapping libraries out there...12
-
Recently I fucked up my laptop's rootfs USB stick again by tugging on it with some wire.. I think it got detached during runtime. Doesn't boot anymore.
So I attached it to my server to chroot into it and see what's wrong..
# cryptsetup luksOpen /dev/sdf2 cryptroot
> Unlocks without errors.
# btrfsck /dev/mapper/cryptroot
> Nothing wrong.
# mount /dev/mapper/cryptroot /mnt
> Mounts just fine.
# chroot /mnt (some other filesystems like /proc, /sys, and /dev were mounted first but meh)
> Enters chroot just fine.
# pacman -Syu
> Upgrades just fine.
# su condor
> Switches user just fine.
$ vim -p some files
> Enters the editor just fine.
Mounted it again to my laptop and try to boot, because it clearly seems like everything is just fine..
> Not gonna boot up. You can unlock your cryptroot and then I'll just fucking stall without saying shit.
MotherFFFFUUUUCCKKKEERRRRRRR!!!!!!! Fuck you HP for making such horrible USB connectors, and fuck you Arch for not giving something more verbose related to the issue, so that I can actually know what's wrong with you, and fucking FIX IT!!! Fucking pieces of junk! Do I really have to build my own PC and build my own LFS, just to have something halfway decent?!3 -
I work in a fintech company and our product is a point of sale app. Two senior indian dev contractors just spent 3.5 months on a feature where all they had to do was map two tables by using a third mapper table and display 2 lists to the user so he could update the data in those two tables.
After hearing same excuses (that they are working in it) for the past few weeks, I took it upon myself and made a proof of concept for them.
Yeah our codebase is kinda shit but even me, a fcking junior with 3 years of experience managed to do it in 1 week.
Meanwhile these fuckers spent 14 weeks beating around the bush and couldnt even save data to a fucking database. They just added UI and thats it. When asked how investigation is going fuckers couldnt even come up with any findings. For weeks. Seniors my fucking ass.
If not for me, I guess they would have taken till the end of the year. No, fuck you, here is an example now pickup your slack.
Im tired of picking after you. God damn incompetent leeches5 -
Okay today I wrote a very ugly api.. No f***king json mapper will handle that response in java. The values are dynamic... Good luck to anyone who will integrate into it... And good luck to anyone who will look at my code
Project manager please always give realistic deadlines2 -
A simple object mapper for CosmosDB SQL API
Cosmonaut is an object mapper that enables .NET developers to work with a CosmosDB using .NET objects. It eliminates the need for most of the data-access code that developers usually need to write.3 -
I was so bored with work in the end. It was more administration than programming. So, i kinda quitted full application development. The thing is, it's expected that you use some existing framework. First of all - they never work how you want and the programming part of your work is mainly solving the limitations the framework brings without hacking too much. You keep within the boundaries of the framework. Besides that - since all fun stuff is already done by the framework builders all you have to do left is kinda administration. Field here, field there, rest call here. Extremely boring. When you've setup the base good, there's no challenge anymore, just producing windows and input forms.
Now, a few days ago, I started to make a clone of rocket chat. I use minimalist http framework (aiohttp) and you have to build most features yourself on top. Same for the ORM, i use dataset which does schema synchronisation for you but doesn't come with models. So i made a complete model / mapper entity framework on top of that. I made one single validation system that applies on models, forms and frontend validation. There's only one truth of valid data. Within the models, services, mappers and forms there's always the services variable available making it possible to fetch any data from any object. Never weird exceptions has to be done to get data. The implemented global LRU cache system is super in auto synchronizing the objects, don't have to do anything manually.
Finally software development of a full product is fun again. If you know how to do it - making your own framework is way easier than an existing one. On top of that, it's more advanced. I do understand that frameworks are aiming to be a bit minimal to be multi purpose, but with that attitude in mind, they still achieve to make it annoying as fuck.
Regarding time, it's just a few days of development. That's nothing for something that does exactly what you want. We have to drop the use-a-framework-because-it-is-stupid-to-do-yourself mentality. We should be programmers again! Not administrators! It's not weird that chatGPT can do so much of our jobs, our projects became lame.6 -
I've been working with Node and Typescript for a while now, and I wrote a wide array of very general utility functions. Examples include:
- Array.filter but you also get the residue array, it can also leave holes in both arrays if you want to join them later
- Array zipping and unzipping to and from tuples (especially valuable when you're manipulating the prop set with Object.entries() in a HOC
- Array maximum selection, with an optional mapper
- Cancelable promises, lazy promises, a promise that resolves when a given function on an object is called (excellent for DOM events), a timeout promise.
- A typed event with both immediate and microtask listeners depending on whether you need state guarantees (this idea I took from a Github gist and upgraded it)
I want to put them on NPM so I don't have to write them and their tests again, and so that if I ever think of an improvement it's easier to propagate it. Do you think I should release them as tiny individual packages which would be nice from a versioning standpoint, or should I make them into a compilation which would be a lot less work for me (and therefore would probably result in better documentation and more tests)?4 -
Hey Guys
Today I'm bringing a tool for you guys, mount servers with old phones Or have servers in your phone for testing.
Tool: Servers Ultimate Pro
Web:: https://icecoldapps.com/app/...
Note1.: Doesn't handle well above android 6+, So test one of the free servers you're intending to use before buying.
Note2.: This App costs around 10€/$ but you can get single App servers for free (I think even html + php + mysql package for free).
Not promotional, I'm just a user that loves this App.
I already talked about this a few times (usually I just call the cell phone I'm using my web server), but as a noob I don't even knot the possibilities.
This App comes with more then 70 protocols (60+ servers and a mix of servers).
From ssh, ftp, html (nginx, lightppd, Apache, simple) with php and mysql, Webdav...
<quote>
Run over 60 servers with over 70 protocols!
Now you can run a CVS, DC Hub, DHCP, UPnP, DNS, Dynamic DNS, eDonkey, Email (POP3 / SMTP), FTP Proxy, FTP, FTPS, Flash Policy, Git, Gopher, HTTP Snoop, ICAP, IRC Bot, IRC, ISCSI, Icecast, LPD, Load Balancer, MQTT, Memcached, MongoDB, MySQL, NFS, NTP, NZB Client, Napster, PHP and Lighttpd, PXE, Port Forwarder, Proxy, RTMP, Remote Control, Rsync, SMB/CIFS, SMPP, SMS, Socks, SFTP, SSH, Server Monitor, Stomp, Styx, Syslog, TFTP, Telnet, Test, Time, Torrent Client, Torrent Tracker, Trigger, UPnP Port Mapper, VNC, Wake On Lan, Web, WebDAV, WebSocket, X11 and/or XMPP server!
</quote>7 -
Wow spent another 20-25 mins mapping out the stack calls to see why varchar was trying to be converted to Nchar which isn't supported and found in my mapper class one fucking method had rs.getNString() which I swear I never touched the mapper class since I made it and was working just fine!!!! I swear IntelliJ is straight up fucking with me2
-
So they develop this app. That uses our front end component library. That queries a GraphQL layer developed as NPM package. That uses a data service abstraction NPM package. That uses another NPM package mapper library. That queries an old REST API returning XML.
It takes days to make a newly added XML node in the bottom-most layer available in the app, requiring changes to 4 repositories and 3 NPM releases.
Refactoring is dead, because 1 change will affect all layers. And the worst part is: theres only 1 app using these packages, so no case for re-use. Overzealous separation of concerns I guess?2 -
I have not used a lot of technology, but among the worst experiences was working with OR mapper. I don't think OR mappers are bad by themselves, but all the tutorials and entry level documentation drag the unknowing user slowly into a world of hurt. It looks super easy and super cool, but in fact if you don't know _exactly_ what's happening in the background you're about to deal with slow performance, terrible SQL statements, missing indices, etc. It makes shooting yourself in the foot a Starbucks-like experience, everywhere, all the time, and fast.
It's one of those promises that do not deliver the easy way despite most people advertising it like this. Except when you plan to write a book'n'author application with only 5 books and 3 authors. Yeah... -
Whenever I see an ORM that supports creating and transforming objects in bulk, I can't help but think about the poor misdirected users who forced it to do that. It's an Object-Relational Mapper. It maps objects. The whole concept isn't designed for bulk operations, the point is that you add logic to each and every record and convert your operations to SQL so that you never have to keep a lot of them in memory.4
-
I identified the need for a product akin to an ORM that maps an algebraic type system such as that of Rust to a key-value database (my situation dictates lmdb but I'd like to abstract away the store). Can you recommend prior art for me to research?4
-
The problem with our current project is that we're using Spring MVC but we only use hashmap for binding (is binding is a correct term for this?) of data with our mapper (We use Mybatis, and also when we get this source code they already implements this kind of stuff, mvc with no models hahaha) for the sake the code to be consistent.
Maybe after I read the documentation of Mybatis and learn how to implements joins, I'll ask a permission to change the hashmap with actual models.