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 - "type"
-
Type it in, type it in, type a bigger number in. Oh how fun it is to break other people's software!7
-
Coworker: "Hey do you have 30 minutes? We should debug my broken code together."
Me: *slightly interested in the project he's working on* "Sure, let's do it."
Coworker: *explains the problem for 10 mins*
Me: "Maybe--"
Coworker: "OH here's the problem!" *type type type* *git commit -am 'Fixed'* "Done."
Me: *wants 10 minutes of life back*9 -
There are two types of people :
1. People who do backup
2. People who will start doing backup
Yesterday I advanced from type 2 to type 1 :-/9 -
USB-C (or Type C) origin story:
Manager: okay let's see your presentation
Developer: bring usb-key
* Inserts key *
* Nope *
* Flips key, tries again *
* Nope *
* Flips key, tries again *
* Nope *
Developer: ahhhhhh , NEVER AGAIN!
5 months later
"USB forum publishes new specification"11 -
I can type the password for the SSH key to my servers while drunk.
Muggles can't type the fucking email address while sober.
WHAT THE ACTUAL FUCK?!!! Is it really that fucking hard?!!! Pieces of shit!!7 -
I really like JS, but sometimes it's just incredibly stupid.
NaN stands for Not-A-Number
typeof NaN
> 'number'
why are you doing this to me8 -
Submitting long written text on browser.
Novice:
1. Type
2. Submit
Experienced:
1. Type
2. Ctrl+a Ctrl+c
3. Submit4 -
I realize not everyone took keyboarding in high school but...
WHO TF CALLS THEM SELF A DEVELOPER AND CAN’T FUCKING TYPE?!?!10 -
Finally got rid of all those cables, just one usb-type-c-cable to plug in my whole office. Love it!8
-
I'm working with a customer named Clint.
I realize now that over numerous tickets I started mistyping his name... just every god damn time.
Guess what letter I left out?
Nice guy for not correcting me ... extra fast ticket response for him now.6 -
A classmate of mine once asked me for a phone charger.
*I would lent it to you, but I don't think you have a type-c*
*No, I have a samsung*8 -
Type T ( something something... )
...
Type * TP = T;
TP.do()
> Be me
> Production code
> Update Type structure
> SEGV
> Wtf why was this even working
> Ask senior
> senior y u do dis
> bc
> Why were no errors
...
> mfw
> He says
"I added -fpermissive and forgot..."
On production since May
...
...
...
... 20072 -
I never had problems with punctuation marks during coding, especially the notorious semicolons because I've always used an IDE, ain't gotta time to waste on compiler errors.
But today I meet my nemesis, a fucking comma wasted an hour of my precious time, causing my unit tests to fail in Python, my unit tests where expecting a list and the actual value is a tuple, it turned out that there was this trailing comma - which I don't know where the hell it came from - at the end of a function call that returns a list.
I only noticed this freaking comma after Pycharm indicated a conflict between the returned type and the expected type and underlined the culprit, that small invisible fucker 😬.
Thank you Pycharm and type hints in Python 3.
this is why, my fellow devs, you have to use an IDE.
PS: For those of you who aren't familiar with python, a trailing comma at end of a variable turns it into a one element tuple.
1, = (1,)1 -
Python Dev Learning C#: I'll just wait until I run the program to see what type the function returns.
Me: Static typing means you know that before the code even compiles!
Python Dev: Sometimes I forget that all functions explicitly say what they can return.4 -
MAD scientist time! Can the USB type C port on Nvidia RTX tuning card used as a standard USB port? Eg charging your phone, or read USB flash drive🤔35
-
Yes, 'cuz lightning is a better innovation over type-c. No wait, it is so not. Apple did move to type-c on ipads and macs ditching their own magsafe and lightning.
Fuck Apple's innonovation.
😒😤😤😤 .28 -
"/path/to/my/file.swift:143:34: error: cannot convert return expression of type 'String.SubSequence' (aka 'Substring') to return type 'String'"
Ah yes, I love it when Substring isn't String5 -
Biggest annoyance of favorite language:
Python has no static type checking. I know that is not something that is intended for Python. It's just that I enjoy the syntax, but would love the type-safety of something like Kotlin/Java12 -
Dear Hipchat, if you are going to implement an Autocorrect Feature, LEARN THE FN TECH LANGUAGE
if i type gradle i do not mean grade
if i type coap, i do not mean soap
if i type mqtt i do not mean mitt
and for f-shake hipchat is not "hip chat", how do you even mess that one up!
(feature now disabled)3 -
When you encounter a bug in your code while writing a test and you have absolutely no idea what's wrong...
...and then you see it's a type problem. -
I can troll all day by opening Devtools on a browser and change <input type=“password“> to <input type=“text“> they think i hacked google, facebook and their email acoount
-
OSC, or open sound protocol, does not have a Boolean type. instead, the Boolean true has type true and the Boolean false has type false.
what.
well.
at least the problem wasn't in my code? -
After coding in c++ for a week now, whenever I type '#' in todoist, my fingers automatically type #include.
And then I correct my mistake. Annoying, but cool -
C++ type fuxor we found by accident in our code. I am not upset about allowing 2 different types to have the same type name. I am upset that the compiler thinks they are the same type and allows pointer assignment. I didn't know you could fool the compiler this way. I suppose this might be useful if the types are in sync. But damn, this is kinda fucked.13
-
This weekly is getting really popular with so many rants coming in.
Shows the extent to which real coders/programmers/developers are tormented by the incompetent education system.
Here is my two cents:
Students should be taught to build their logic on paper before jumping on to their keyboards.2 -
There are 2 types of bosses:
Type 1: Who think you are avoiding work
Type 2: Who are not your bosses -
Features suggestions:
1. When we type @ in the comment section it'll be nice to have autosuggest of users as we type. This will help not closing the comment and checking the spelling again and again.
2. Search available on basis of tags. Type in a tag you want to search about and get all rants/questions with that tag.14 -
Have you ever experienced the 4th type of headache? 😱joke/meme programming comic coder programming joke programmer life meme headache programming life coding programmer programming fun funny1
-
const abc: string = 'Hi';
Can we take a moment to appreciate how retarded it is that TSlint throws a warning here that the string type is inferred and unnecessary.
I want to put the type there because it looks more readable. Code looks better if every variable has a type, irrespective of whether it's a constant. I know the fucking type is inferred you braggart linter bitch. What the fuck does it expect? A fucking award because it inferred that a string constant is of the fucking type string? How the ever loving fuck does that warrant a squiggly ass yellow warning line, reminiscent of that smartass 10 year old in class who has to yell out every answer when the teacher never asked a question.5 -
I aspire to become the type of dev that understands frameworks and has technical depth rather than the type that just implements things but it's a struggle. I don't know where the foundations are.7
-
I feel some type of way when i see someone type in the correct url for a website in the search bar and then click the link in the results. WHY!? 😒2
-
Hi everyone here's a question which has caused many arguments in my lurking spots on discord.
What is the worst type of bug? (logic, type, syntax, etc)
//you decide what "worst" means14 -
I hate debugging document oriented data types..
Can't even sysout easily like primitive data types.
Need a debugging duck.1 -
Today's rant: JavaScript's type system.
I realized halfway through that I can't happily call JavaScript a "programming language" so just assume
alias programming="scripting"
I'm sure it's not actually as frustrating as it seems to me. Thing is, I'm used to either statically-typed languages or dynamically-typed languages that actually make sense. If I were to try to add an integer to something I'd forgotten was a string in Python, it'd immediately tell me "look, buddy, do you want me to treat this as a concatenation or an addition? I have no idea the way you've got this written." I've found that mistakes are a common thing with dynamic typing. Maybe I'm just not experienced enough yet, maybe it's really as stupid as it looks. JavaScript just goes "hey look I'm gonna tack all of these guys together and make a weird franken-string like '$NaN34.$&' because that's absolutely what we want here!" Then I run my webpage and instead of a nice numeric total like I wanted, good old JavaScript just went "Yep, I have no idea what I'm doing here I'm just gonna drop this here and pretend it's right." Now absolutely I do not expect my programming language to make correct assumptions and read my mind, otherwise JavaScript would be programming me and not the other way around. But it could at least let me know that I had incompatible types going on rather than just shamelessly going along with what it's doing. Good GRIEF, man, some of the idiosyncrasies of the EMCAScript language definition itself just make me want to punch a horse.6 -
Dear dongle manufacturers, I love USB-C, I think everyone does; it is the bomb... But.... But but but, please stop charging so much extra for it, I can get a USB-A to Ethernet adaptor for $12 AUD but it's going to cost me at minimum $49 AUD for the same branded dongle, even has the same internal chips... Why... Just... Why!16
-
// TODO : Resurrect dev team
if(devRant.development ⩶ 'active')
devRant.notifications.addPanel({
content : [ '++' , 'comments' ] ,
type : 'split'
})6 -
Types of users in devrant with high #++
Type 1. Who posts minimum rants, but each ones get most ++
Type 2. Who posts a lot of rants, but each ones gets low ++
Type 3. Who posts minimum rants, but give lots of comments even if each comment gets low ++
Tyoe 4. Who posts minimum rants, and minimum comments, but both gets high amount of ++
In which type would you classify yourself?
Or did I missed any other type...8 -
Not a prank, per se, but I type using the Dvorak layout. It's hilarious to watch people's confounded reaction as they type, expecting QWERTY output. It never gets old.1
-
Currently working on an inventory system. I have main, Side, local and premium items. And I also have inventory slot lists for each type. My Lists are called:
MainSlots
SideSlots
LocalSlots
PremiumSlots.
I grin everytime I type it out...4 -
Me, rueing typescript: "Dammit, Typescript!"
Typescript's cheeky response: Type 'string' is not assignable to type "Dammit"
ಠ_ಠ -
Need advice. I've constantly been the type of person who cannot master any programming language because I struggle with knowing "what to do/type next". If you had this problem and fixed it, how?8
-
"Easily add this widget anywhere that accepts Html."
Oh, nice.
*click*
"<script type='text/javascript' src='https://company.com/widgets/...'></script>
<script type='text/javascript' src='https://analytics.com/trackers/...'></script>
<script type='text/javascript'> companyWidget3.initialize('Hello world', 'id12345', '#123456'); companyWidget3.config("https://company.com/resources/..."); companyWidget3.fetchResources(); companyWidget3.logUsage("ref=12345", annoyingTracker); annoyingTracker.notify("myass");
// other bs
companyWidget3.draw();
</script>"
Nice fucking html, fml. -
I'm the kind of person that can type without looking at the keyboard. But... I don't really know how to type, I just do it unconsciously. But when someone reminds me of the keyboard, or I think on the keyboard. I can't stop looking at it when typing. Suddenly I forget how to type. fuck fuck fuck now I can't stop looking at it.l ksajfn;laksj fpdsbaf;dsajfn4
-
Turns out that one can use the ‘var’ keyword to declare a variable in Java 10. Finally Java’s being more like JavaScript 😊5
-
20 years ago, in China, they sold a so-called learning-machine which is a modified version of super Nintendo with a full sized keyboard, you could use it to learn how to type, and play Nintendo games. somehow it supports basic, and the manual book have printed a full code to create a stupid game with you could move a super Mario character with arrows, me and my step brother spend a whole day typed the 40+pages of code and enjoyed the game for 5 mins. BTW you can not save your program. after that I think it is so cool to create vedio games by programming.
-
Having a static class in C# with 20 variables of generic type: ArrayList with zero documentation to know type of array content 😒1
-
I'm losing this match that I'm playing online.
I know what to do.
Type with CAPS LOCK on, and furiously type out curse words and talk smack about how I boned everybody's mum last night.8 -
WTF Is wrong with Kotlin! Every fucking time I upgrade its Android Studio plugin i receive loads of errors about: Type mismatch: inferred type is FragmentActivity? but FragmentActivity was expected
for fucks sake bitch! Why the hell you keep on switching from optional to non optional on every fucking update, my commit history is full of this type of fixes -_-5 -
Plugged in a type c hard drive.
Changed the drive letter from another internal hard drive.
Type c hard drive is locked from safe removal. Process "System" accesses .\$RmMetadata
Seriously? Microsoft?2 -
:first-of-type works with classnames but :last-of-type does not. who thought this would be a good idea??2
-
It's really annoying when you're watching a tutorial video and the person speaks much faster than he can type.
1.5x speed and the guy manages to type a single line of <p> tag and has like spoken 30000 sentences. -
Anyone tell me...
what is wrong?
https://gist.github.com/cozyplanes/...
<!DOCTYPE html>
<html>
<body>
<input type="text" id="username" />
<input type="text" id="subtext"/>
<br>
<button type="button" id="create">Create</button>
</body>
</html>
<script type="text/javascript">
var username = document.getElementById("username").value;
var subtext = document.getElementById("subtext").value;
var url = "https://devbanner.center/generate/...;
document.getElementById("create").onclick = function () {
location.href = url;
};
</script>27 -
Working with a SOAP endpoint. I know it is some .NET server due to the style of stacktrace on exceptions. Nice, a framework where I can expect some type safety granted by static types. I build some xsl to transform the SOAP wsdl files into classes and structs to interact with the endpoint. Works out perfectly.
Plottwist!
Elements which are defined in the xsd/wsdl with maxOccur=unbounded and minOccur=0 should represent a simple collection of this type. Therefore does my implementation expect a collection of this type. But no. The shipped SOAP client in my stack ignores the definition and simply deserializes the SOAP response into T and not a collection of T.
Where the duck are the types when they are defined all over the place?2 -
I just spent about 4 hours debugging a PHP bug because of its weak type declaration. Some please point me to another language, Im done with PHP.12
-
Today I learned.
In php if you cast a string to array you get an array with one value: the string.20 -
user... user... user... USER...USE!!!! why do I always type user when wanting to type user!!! USE!3
-
Apache Thrift!
Content-Type: application/x-thrift
I need to decode a message, but I'm stuck af. Thrift-tools, burp extensions, ThriftDecoder and several other libraries were not helpful.
Anyone who knows that type of stuff?8 -
How do you type with pairs of characters like () [] <> "" etc.?
Do you type them both, then move the cursor back and type the stuff inside or do you type the first of the pair, then type the stuff inside and then close it with the second of the pair?
I just realized I do both techniques, apparently randomly, which weirds me out.
Also my IDE often places the second character of the pair automatically.10 -
HDL choices:
Verilog: Spend hours finding bugs in implicit type casts.
VHDL: Spend hours writing type casts.1 -
{
"$schema": "http://json-schema.org/draft-04/...#",
"type": "object",
"id": "https://[URL_NAME]/forms/{id}/...#",
"properties": {
"title" : { "type": "string" },
"date" : { "type": "string" },
"content" : { "type": "string" },
"date_start": { "type": "string" },
"date_end" : { "type": "string" },
"status" : {
"type" : "string",
"enum" : ["1", "2", "3", "4", "5"]
}
},
required [
"title",
"date",
"content",
"date_start",
"date_end",
"status"
]
}
See if you can notice the error is this schema. Don't copy and paste it. I change some format to obsfucate the real data naming, but this schema error is still up there
Just wasted my 30 minutes staring at this10 -
Budding Developer here...
I've tried to teach myself Web Dev over the past 10 yrs on/off... Sad. But now I'm actually in a developer role moved up from IT helpdesk a year ago.
In the past year I've learned SQL, SSRS, SSIS, database concepts, and.... VB6. I am a master at none due to having to cram so much in a year while taking on various projects, issues, and learning the organizations software infrastructure and processes. I also taught myself current HTML, CSS, and basic Javascript. Learning the different basic concepts with each.
Over the past couple months I've been given a new project and now learning ASP.NET and C#. Actually trying really hard to get adept at these as I'm finally doing Web Developing in my role...
I am also dealing with multiple major family issues and a near 2 yr old that we cosleep with that still doesn't sleep through the night.
Why the crap is it so easy to convert an enum to a string but takes 50 functions to convert a string to an enum???
Cast, convert, parse... Why so much logic???
When the online teacher says type why do I have to rifle through 7 different meanings in my head before I know what kind of type he's referring to??4 -
Realising how fucked and broken python's type system is because none of the type checkers have implemented it correctly.2
-
Some compilers give an error message on forgotten type casting. From that it shows good typing style casting. So you also avoid clerical errors that can lead to the program crash in the worst case. With some types it is also necessary to perform type casting comma on others Types, however, do this automatically for the compiler.
In short:Type casting is used to prevent mistakes.
An example of such an error would be:
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int * ptr = malloc (10*sizeof (int))+1;
free(ptr-1);
return 0;
}
By default, one tries to access the second element of the requested memory. However, this is not possible, since pointer calculation (+,-) does not work for a void pointer.
The improved example would be:
int * ptr = ((int *) malloc (10*sizeof (int)))+1;
Here, typecasting is done beforehand and this turns the void pointer into its int pointer and pointer calculation can be applied. Note: If instead of error "no output" is displayed on the sololearn C compiler try another compiler.1 -
What do you guys think about the new "type inference" (var type) feature that will be introduced with Java SE 10? I know that C# already has that construct. It's pretty controversial among my peers... 😅4
-
I don't know what to do because union and sum types both totally suck but I need them for my scripting language
Union types are fun and intuitive because they can be used with type refinement but they're not hierarchical thus bad for generics.
Sum types (or tagged unions) are great because they're hierarchical and can be nested properly but they need ugly type matching constructs.
The positive thing is I'm not making a systems language anymore so I only wanna jump of a bridge every second day5 -
So I got an error in my xaml page, saying it can't add object of type A
okay but I asked for type B. -
Programmer: Type type(2);
C++ Compiler: // Okay, I'll use the constructor that takes 1 argument
Programmer: Type type();
C++ Compiler: // I see there is a constructor that takes no arguments, but surely you don't want that. Everybody loves functions, a function shall be declared!
Who, in their right mind, thought this syntax is a good idea?! Syntax inconsistencies drive me crazy...11 -
What do you think of personality types and which do you think is the most prevalent in the developer community?4
-
After the fun I had with the XEN Orchestrator UI ( https://devrant.com/rants/2554182/ ) I build an exporter that normalizes XEN / Proxmox API output and writes it into a nice spreadsheet.
Took PHP 7.4 for a spin. Sweet jesus, lot of nice stuff.
Been nearly a year since I did something larger than small scripts in PHP, but felt really at home again.
The type hinting and arrow functions made writing the exporter a breeze.
DTOs with typed properties spared me quite a bit of headache when normalizing the different APIs...
Utilizing *sort with fn arrow function is a pretty nice and concise one liner with the spaceship operator.
And I have now a nice spreadsheet...
Thanks at the PHP folks.1 -
#magento
Idk who's developing that, but that's what occured to me:
Request for getting specific category in shop:
V1/categories/{category_id}
Request for getting categories list:
V1/categories/list
....?
"Invalid type for value: "list". Expected Type: "int""
I wonder fucking why -.-'1 -
print(type(signal))
print(type(-signal))
print(type(-1*signal))
returns....
<class 'numpy.ndarray'>
<class 'numpy.float32'>
<class 'numpy.float64'>
ffs.2 -
Just realized that it’s been a long time since I had to deal with collections that contain values of different types and that ugly type checks that come with it when you need to do something with the values.
Sum types are really a blessing. -
Image upload is broken again so I made a page where we easy can upload and share any type (so we can share source files) of file on devrant: https://devrant.molodetz.nl
Enjoy!
Project page for source: https://retoor.molodetz.nl/retoor/...
Design is 40% by GPT. Modified a lot. I'm happy with the looks now. Originally it was white mode, i applied filter: invert() for a dark mode. Result isn't bad.6 -
mfw when clang decides my NSDictionary changed its type somehow to the same type as my block pointer thingy and now I can’t assign to it3
-
When elements of an union are distinguished by a boolean, VSCode's Typescript plugin can only do type elimination if I branch by "== true" and not if I just branch by the boolean.
This is because Typescript treats booleans as an union of the constants "true" and "false", and compile-time elimination can only be done if I use syntax that makes sense with unions. Logical evaluation, for some reason, doesn't.
The fact that this issue can even appear is deeply concerning.1 -
*plugs in Sun Microsystems Type 6 keyboard*
Okay, several questions:
- Why is my Compose acting like Super?
- Why does Meta no longer exist?
- Why does Menu no longer exist?
- Why is Num Lock stuck on?
$ sudo dpkg-reconfigure keyboard-configuration
> Sun Microsystems Type 6
Thats better. -
We don't talk enough about type 2 error! So many papers everywhere are just pure trash because they don't account for it, and people are so fucking oblivious about it, they don't even catch the obvious ones. Even researchers and publications which are supposed to properly review their articles simply fail to ask the obvious "Did you measure the segment which doesn't fit either of your variables?"7
-
I love Typescript's challenges. Today I had to make a generic interface that replaces every property in its parameter with either itself, a promise of itself or a different property keyed `obtain${key}` which is a function returning either the value or a promise of it. Not a very difficult challenge, but it was very satisfying to solve.
If anyone has the patience to attempt it I'm very curious what more experienced type theorists than myself come up with.1 -
is it just me or do other guys too just randomnly type whatever keys on the keyboard and Ctrl+backspace it to type something of meaning.
kinda like just stretching my fingers for keyboard.3 -
It's probably no news that I love Typescript's versatile and powerful generics. Today I found what is probably the most brilliant use of these tools to solve a real problem. This package exports one generic type which takes one generic argument, reads it like a JSON schema and returns the Typescript type for it:
https://github.com/YuJianrong/...7 -
"stacktrace"
Universe.SolarSystem.Earth.Microsoft.Dynamics.Platform.Integration.Services.OData.Query.DataAccessor.GetQueryableCollection(Type instanceType, Boolean isCrossCompany)1 -
Useless language feature #1: specify kind in explicit expression type annotations that you insert to guide the type inference engine.
How did I work on this for 6 months without realizing that the kind of a value's type is always the kind of types because that's literally what the kind of types means?2 -
I posted a rant... on Quora: Why-do-most-software-developers-suck-at-algorithm-type-interview-questions
https://quora.com/Why-do-most-softw...
Thoughts?9 -
Is there any secure keyboard android app with word prediction feature and can let me type in Hindi, English, Hinglish (Hindi phonetic)
I heard google keyboard sync everything you type1 -
I need to finish something presentable by May so I decided to make Orchid an untyped language, and the simplicity of all tasks all of a sudden breaks my heart. Static analysis is my guiding principle, the one feature which I always held to be good. Deprioritizing it in _my own programming language_ feels like sacrilege.9
-
The code I'm working in always has problems with stuff like "Object obj=new Object();" or "List stuff=new List;" without type specification, but now I found the summit: "private void methodName(Type parameter) *throws Exception*"
-
I can't use this keyboard to program:
Got a transparent touch LED keyboard because I thought it was cool, turns out the lazy chinese programmers have used a really long debounce time of ~100ms in its firmware to prevent duplicate keystroke detection.
Which means, I can't type as fast as I want on this thing! 😭 -
Hey guys, did you know that you can use `impl Trait` in the position of an argument in Rust to identify an argument with its capabilities without the boilerplate of a generic parameter?
With that in mind, I present to you Rust's universal type:5 -
C/C++ considers pointers to be declared next to the variable name rather than the type name (int *x, *y vs int* x, y).
I know this but I still consider * to be more associated with the type. Therefore I'm one of those people who declare each variable in its own line and group the type and * together. (int* x; int* y)5 -
Rust's Fn traits feel weird. The argument tuple is a generic parameter, but the return type is an associated type, even though Rust is supposed to use Hindley-Milner type inference, so inferring through return type should always fail if this were a regular trait.
Then, this would mean that blanket implementations for Fn(T) and Fn(T, U) should conflict because AnyTrait<(T)> and AnyTrait<(T, U)> aren't mutually exclusive. I tried, they work just fine.
There's some weird and I suspect unnecessary special case magic here, and I'd like to uncover it.17 -
Like this
```
((Type.ClassType) typeElement.getSuperclass()).asElement().baseSymbol();
((Symbol.ClassSymbol) typeElement).baseSymbol();
//((Type.ClassType) typeElement.getSuperclass()).asElement().getEnclosedElements().get(2);
((Type.ClassType) typeElement.getSuperclass()).asElement().getEnclosedElements().get(8);
//mirrorToElement(typeElement.getSuperclass());
Type type = (Type) typeElement.asType();
//Symbol symbol = ((Type.ClassType) typeElement.getSuperclass()).asElement().getEnclosedElements().get(2);
Symbol symbol = ((Type.ClassType) typeElement.getSuperclass()).asElement().getEnclosedElements().get(8);
//new Types(((JavacProcessingEnvironment) processingEnv).getContext()).memberType(type, symbol);
((JavacTypes) processingEnv.getTypeUtils()).types.memberType(type, symbol).getReturnType();
//((Type.ClassType) typeElement.getSuperclass()).asElement().getEnclosedElements()
``` -
I discovered in a project that Maven artifacts have a new type:
<dependency>
<groupId>com.idontexist</groupId>
<artifactId>idontexist</artifactId>
<version>2.5.1</version>
<type>pom.lastUpdated</pom>
</dependency>
It's amazing, because with this special type you can set a dependency that doesn't exist in any repository AND THE COMPILATION WORKS ANYWAY!!! It's very useful!!!!1 -
My unidirectional type-c cable. Essentially is a Type C to Type A-female adapter with a Type A to Type C cable plugged in, but with the plugs bypassed with a soldered joint.
Useful for devices that have Type C but refuse to implement protocols, just using 5v bus. They only work with Type A to Type C cables. Usually, they’re vapes and other low-cost devices.
I made this cable to charge my heated tobacco device. Now, since I quit smoking, I don’t need it anymore, but I’ll keep it nonetheless because it’s kinda neat.1 -
There is nothing worse than trying to program while having RSI, it’s either you have your wrist support on and type slowly and hit multiple keys, or you have it off, type slowly and live with the pain3
-
So, the PowerQuery type system appears to be a Joke.
For those you that aren't familiar with PowerQuery, it's the ETL language that is used in PowerBI, and some other parts of the MS PowerPlatform. It was formerly known as the M Language.
The language has a type system, that includes records (think hashes) and tables, which are, for practical purposes, a list of records.
The wonderful M language specification document states that:
"Any value that is a record conforms to the intrinsic type record, which does not place any restrictions on the field names or values within a record value. A record-type value is used to restrict the set of valid names as well as the types of values that are permitted to be associated with those names."
Except that the restriction is only to the set of valid names, and the language interpreter doesn't throw an error when I place a number into a text field, but also doesn't do any sort of implicit conversion. This is all hunky-dory, until you then try to load the data into the Tabular Model that underlies the query engine, which does expect the values to be of the type that is specified, and it throws an error.
But PowerBI, in its infinite wisdom, doesn't actually *record* the error, it merely tells you the error exists, and tells you to go back to the query editor to list the errors thrown up by the powerquery engine. Which, as previously stated, doesn't throw up an error for this instance.
So I've spent all afternoon trying to work out why my queries aren't loading, because I have an error that doesn't exist. fml.
[You can follow this issue on the communtiy feedback site here: https://community.powerbi.com/t5/... ] -
Those of you working with .NET, do you prefer C# casting syntax:
(Type)variable;
Or VB casting syntax:
variable as Type;3 -
There are two types of developers in the world.
Type 1:
if(isLoggedIn) {
}
Type 2:
if(isLoggedIn)
{
}
Be in Type 1, you can't save world but at least you can save one line in file.2 -
Typescript is my new favorite and my grudge is the stupid scoping of type assertions. I have an async function that checks whether a variable is set and awaits a change event if it's undefined. This function is working javascript but invalid according to typescript, because it relies on the exact type changing while the function is running. I had to convert it to a mess of promises to bypass this because (and this is the best) the callback-based syntax of identical meaning will reset all type assertions, even locals that are never written after the callback's creation.8
-
Looking at Rust's preliminary fn trait model (basically the function call operator) and I don't get one thing:
Why is the argument tuple a generic type parameter and not an associated type? It would've been so easy to ensure consistency in the position that Rust doesn't have overloads. A trait can be implemented for any number of generic type parameter values, but an implementation may only have a single type for each association.3 -
Trying to put translation in a drupal 8 project with
Content type => Paragraphs type => paragraphs type.
Wtf i need to translate in witch level OMG.
😭🔫 -
So when someone chooses the type of rant as "devrant", are they thinking the other rant types will end up on some other website?
Maybe the rant type should say: "devrant (meta)"4 -
Angular and is best friend RxJs are too over engineering and far from the concept of 'keep it simple, stupid'
But just a moment they're both use typescript to design there interfaces ... maybe that is the fucking reason for that !2 -
Wish the Objective-C compiler had better type checking. There's no reason for it to not error out when I'm migration a property from one type to another.
-
Can we say that "a basic website is a type of app that serves documents", implying a website is more specific than an app, and the most common type of data served is in the form of a document (html, pdf, json, xml).
I'm trying to see how this argument does for/against flat-file cms'es in specific/ general cases per type of app/ website.1 -
Do you type with palms down or up?
If you write with palms up (correct posture) how long it takes until your hands are a bit tired?4 -
typedef bool Bool;
Class Description
{
public:
inline Bool IsTypeA() const { return IsType(TYPE_A); }
inline Bool IsTypeB() const { return IsType(TYPE_B); }
inline Bool IsTypeC() const { return IsType(TYPE_C); }
Bool IsType(DescriptionType T) const { return (T == Type()); }
DescriptionType Type() const { return m_Type; }
private:
DescriptionType m_Type;
}
I can't make this shit up3 -
I'm pretty anti-apple but it's clear that the 3.5mm jack and the standard USB port is going to go. Other manufacturers will be using only type C very very soon. BT > 3.5mm and everything will use type C USB.6
-
If someone tries using "multipart/form-data" as only content type for their PUBLIC API ENDPOINTS again I am going to find them and choke them to death.
And if your documentation says you are using something else (application/x-www-form-urlencoded) I am doing it twice.
JSON apis should be standard.
EDIT: I had to fire up BurpSuite proxy, after almost an hour I accidentally switched the body type - voilà1 -
There's two types of developer.
Type 1 :
def function() {
// code
}
Type 2 :
def function()
{
//code
}
So, which one are you? I won't judge if you're not type 1.4 -
Brain fart.
In Java and many other languages there are basic types, like char and String. So why does Java have char and String, but not a digit type?
A number is basically a series of digits. For modular arithmetic it is very useful to be able to extract the 3 in the number 1234, it's just the 3rd digit in a number.
Base 2, base 10, base anything could be supported easily too. E.g. a base 2 digit would be:
digit d = 0b2; // or 1b2, but 2b2 would be a compilation error
A number would then be some kind of string of digits.
Any thoughts on this?9 -
I kind of feel like I type faster when I use Windows than Linux.
Don't know whether it is because I type code on Linux and !code on Windows1 -
String good =
"I'll never give up type systems!!"
+ " Do you hear me?!"
+ " Never!";
bad =
"Can't believe it made it all the way into prod."
% NaN + 3 / '11' -
Worst / best feature of any language:
Lack of / requirement of strict / dynamic / weak / strong typing. Just typing. Typing typing typing just typing.
Having to specify the type in C/++/#, Java/Kotlin is so annoying and delays the project so much by having to do declare weird classes with 3 or 4 fields just because you need it in this tiny line of code.
Not having good type support in JavaScript and Python is a pain in the eyes when you can't find what type each variable is, or when you pass a wrong argument to a function, and when you do, it shows the definition for the type in a .ty or.pyi file and not the definition itself which you have to find elsewhere. Spent half of my uni exams trying to decipher the type while it could've been a piece of cake if you just knew the type.
Love / hate relationship 😝1 -
What's harder than trying to name a variable is to think of a memorable but easy to type password to a system that resets expires every 3 months with history checks.2
-
In type systems without variadic generics, tuples should be defined as a type-level conslist:
Tuple<int, Tuple<string, Tuple<bool, TupleEnd>>>
Consider the possibilities, even just in a regular type system, then consider how much more is possible with dependent types!4 -
After a month off from developing. I got butterfingers, can't type string with typing an extra 'h' into it. Surprised I didn't type with my thumbs instead.